Identify item by either an ID or a slug in a RESTful API
Of the three I prefer the third option, it’s not uncommon to see that syntax; e.g. parts of Twitter’s API allow that syntax: https://dev.twitter.com/rest/reference/get/statuses/show/id A fourth option is a hybrid approach, where you pick one (say, ID) as the typical access method for single items, but also allow queries based on the slug. E.g.: GET … Read more