https://foobar.com/collection/element
Verb | Collection | Element | Success code |
---|---|---|---|
GET | List | Representation | 200 OK |
POST | Create element with system assigned URI | Not used | 201 CREATED |
PUT | Replace collection | Replace element | 201 CREATED |
DELETE | Delete collection | Delete element | 204 NO CONTENT |
OPTIONS | Describe interface | Describe interface | 200 OK |
HEAD | Metadata | Metadata | 200 OK |
Idempotent – same result each time (PUT, DELETE) Safe method (nullipotent) – no side effects (GET)
200 OK 201 CREATED 204 NO_CONTENT 400 BAD_REQUEST 401 UNAUTHORIZED 403 FORBIDDEN 404 NOT_FOUND 409 CONFLICT