So I'm building a REST api and need to make some urls. The problem is, I'm running into some conflicting paths. For example:
GET <type>/<id>
gets the details of an object of a given type and idGET <type>/summary
gets the summary of objects of a given type
This simplified example shows a problem occurs when an object has id "summary". What is the best way to solve this? From a REST puritan perspective, what should be the solution?
Here's some of my ideas:
- Put the
<id>
in query parameters. From what I understand this is against standards - Put a keyword at the start of the url. Also against standards?
- Disallow certain id values. Not something I want to enforce for all my users and use cases and different entrances into my system