Should I POST to the collection when creating a resource with a known ID in my REST API? -
i'm implementing new rest api. in api typically post collections create resources. 1 of resources, id known before created. make more sense post collection id in body or post instance (as yet non-existent) id in url?
i'd keep existing endpoint , add id
in body when post
ing collection, there's no point in adding new separate route what's same thing.
Comments
Post a Comment