A REST API can have arguments in several places:
- In the request body – As part of a json body, or other MIME type
- In the query string – e.g.
/api/resource?p1=v1&p2=v2
- As part of the URL-path – e.g.
/api/resource/v1/v2
What are the best practices and considerations of choosing between 1 and 2 above?
2 vs 3 is covered here.