retrieve all resources in a collection (header only)
HEAD
resource
/users/3
retrieve a single resource (header only)
POST
collection
/users
create one or more resources in a collection
PUT
collection
/users
replace one or more resource (missing fields are deleted)
PUT
resource
/users/3
replace a resource (missing fields are deleted)
PATCH
collection
/users
update one or more resource (missing fields are left untouched)
PATCH
resource
/users/3
update a resource (missing fields are left untouched)
DELETE
resources
/users/3
delete a resource
OPTIONS
any
/
return available HTTP methods and other options
Supported verbs per endpoint
there should be an apps:id/.. for every resource except apps
Endpoint
GET
POST
PUT
PATCH
DELETE
HEAD
OPTIONS
Bulk Supported
apps
1
1
0
0
0
1
1
0
apps:id
1
0
1
1
1
1
1
0
users
1
1
0
0
0
1
1
0
users:id
1
0
1
1
1
1
1
0
apps:id/users/
1
1
0
0
0
1
1
0
apps:id/users/:id
1
0
1
1
1
1
1
0
feeds
1
1
1
1
0
1
1
1
feeds:id
1
0
1
1
1
1
1
0
posts
1
1
1
1
0
1
1
1
posts:id
1
0
1
1
1
1
1
0
user-posts
1
1
1
1
1
1
1
1
user-posts:id
1
0
1
1
1
1
1
0
user-feeds
1
1
1
1
1
1
1
1
user-feeds:id
1
0
1
1
1
1
1
0
users:id/user-feeds
1
1
1
1
1
1
1
1
users:id/user-feeds/:id
1
0
1
1
1
1
1
0
apps:id/users/:id/user-feeds
1
1
1
1
1
1
1
1
apps:id/users/:id/user-feeds/:id
1
0
1
1
1
1
1
0
queries
1
1
0
0
0
1
1
1
queries:id
1
0
1
1
1
1
1
0
apps:id/queries/
1
1
0
0
0
1
1
1
apps:id/queries/:id
1
0
1
1
1
1
1
0
tags
1
1
1
1
1
1
1
1
tags:id
1
0
1
1
1
1
1
0
apps:id/tags/
1
1
1
1
1
1
1
1
apps:id/tags/:id
1
0
1
1
1
1
1
0
users:id/tags
1
1
1
1
1
1
1
1
users:id/tags/:id
1
0
1
1
1
1
1
0
users:id/queries
1
1
1
1
1
1
1
1
users:id/queries/:id
1
0
1
1
1
1
1
0
apps:id/users/:id/tags
1
1
1
1
1
1
1
1
apps:id/users/:id/tags/:id
1
0
1
1
1
1
1
0
apps:id/users/:id/queries
1
1
1
1
1
1
1
1
apps:id/users/:id/queries/:id
1
0
1
1
1
1
1
0
Inputs and outputs
all methods not in the table below will receive a 405 status code with Allow headers
Method
Url
Query
Headers
Body
–>
Status
Headers
Body
GET
users:id
Accept: *
200/404
User:JSON
Accept: application/json
200/404
Accept: other
406
ETag/If-None-Match
200/304
GET
/users
include/exclude
Accept: *
200/400
Link
[User]:JSON
where
Accept: application/json
200/404
X-Total-Count
sort
Accept: other
406
start
limit
DELETE
users:id
204/404
POST
/users
User:JSON
201/409
Location
POST (bulk)
/users
[User]:JSON
200
Link
PUT
users:id
User:JSON
204
PUT (bulk)
/users
200
PATCH
users:id
204
PATCH (bulk)
/users
200
HEAD
ANY
200
ETag
Last-Modified
OPTIONS
ANY
200
Allow
Notes
Bulk operations
Bulk operations are performed by sending an array of objects at the collection level
Some collection resources accept both a single element and a collection for methods such as PUT,POST,PATCH
and according to the input payload the server will detect if a single or bulk operation is requested
Bulk operations never fail but will return an array of responses (including error and success results)
Bulk creations will return a list of Link headers instead of the Location header
Bulk creations will return a 200 status instead of 201 since not all requested items may succeed in being created
but the operation as a whole will always succeed
Idempotency
All GET, PUT, DELETE, HEAD, and OPTIONS requests for single operations are idempotent
Store specific
Elastic-search
elastic search documents will be indexed when modified