Hot answers tagged

9 votes
Accepted

What to name a POST endpoint that behaves like GET?

Since you are throwing REST out the window by using a POST to retrieve data, it does not matter what you call it. Choose a name that fits the use case, and don't worry about REST semantics. Large ...
3 votes

What to name a POST endpoint that behaves like GET?

What to name a POST endpoint that behaves like GET? Anything you want, really - the machines don't care what spelling conventions that you use for your resource identifiers. That said, the machines ...
2 votes

Is it okay for a POST response to return resources other than those in the request?

TL;DR Neither REST nor W3C are concerned with what your resource representation may contain. (the answer to both questions "is it okay" -- Yes) For reference, Roy Fielding's original ...
  • 10.2k
2 votes
Accepted

Additional questions for an old topic: "How to specify many ids and their variable name in a REST API request?"

The answer in the linked question is pretty bad. There is no "standard" against querying multiple "ids". In fact, you said the UI already does this. Well, the web is RESTful. So ...
1 vote

Best practise for designing REST API endpoint that accepts a nested resource POST

The problem isn't so much which one to choose but that the two solutions conflict. ie. if I post to account with the contact list then I overwrite (possibly delete entirely?) the relationship with ...
  • 65.4k
1 vote

Is it okay for a POST response to return resources other than those in the request?

Short: You can return whatever you like, provided you tell the client what it is. In REST all messages are self-descriptive. For HTTP requests and responses it means that messages indicate what they ...

Only top scored, non community-wiki answers of a minimum length are eligible