slumber
slumber copied to clipboard
Mixed trailing slashes
Consider this API: site.com/api/collection/item to get an item site.com/api/collection/ to get the whole collection
Currently, either everything ends with a / or nothing does. Typically, if it ends with a / it means it's a collection.
At work the group choice ended up being:
- site.com/api/items/id – to get a single item by id
- site.com/api/items – to get all items
Not disregarding your note, just wanting to make sure this scenario is considered as part of the discussion.