URI Structure
Note
"foobar"
is a placeholder name intended to represent whatever is being discussed.
Method | URI | Notes |
---|---|---|
GET | /foobars | Returns a collection of the foobar entities. By default, items in the list are a minimal representation of a foobar entity. Note that we use the plural for the directory name. |
POST | /foobars | Creates a foobar entity and returns a link to entity in the form /foobars/foobar- {id}. |
GET | /foobars/foobar-{id} | Returns the full content of the foobar identified by the given id. Note that we use the singular for the entity name. |
PUT | /foobars/foobar-{id} | Updates the contents of a foobar entity. |
DELETE | /foobars/foobar-{id} | Deletes the foobar entity. |
Sub-elements of a foobar entity are made available as sub-resources of /foobars/foobar- {id}, e.g.:
/foobars/foobar-{id}/bazs/baz-{id}/bloops/bloop-{id}
Note
The ID in each URI comes from the collection preceding it. When a resource contains multiple IDs, the notation does not imply that the IDs are identical. Refer to the collection to get the ID.