Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4115

Conflicting REST urls

$
0
0

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 id
  • GET <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

Viewing all articles
Browse latest Browse all 4115

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>