-
Notifications
You must be signed in to change notification settings - Fork 152
HTTP Status Codes Success (2xx)
Use cases:
- update/retrieve data
- bulk creation
- bulk update
❌ You MUST NOT use 200 OK for everything!
Should be used after a successful POST creation request.
The response should include the Location header with a link towards the location of the created resource.
Use cases:
- create resources (single items)
Means that the request has been accepted for processing but the processing has NOT been completed.
The response should include the Location header with a link towards the location where the final response can be polled & later obtained.
Use cases:
- asynchronous tasks (e.g., report generation)
- batch processing
- delete data
- you SHOULD use this if the delete operation is NOT immediate. Your client needs to be able to poll for the final result
Means that the requested operation succeeded but that no content is returned.
Use cases:
- delete data
- you SHOULD use this if the delete operation is immediate
❌ You MUST NOT use this for out of bounds errors with pagination (check out the pagination section for details).
Means that the server has fulfilled the partial GET request for the resource.
The request MUST have included a Range header indicating the desired range, and MAY have included an If-Range header to make the request conditional.
❌ You MUST NOT use this as we will not use Range headers in our APIs. Take a look at the pagination section for more details.
This project is distributed under the terms of the EUPL FOSS license
REST Resources Design Workflow
REST Resources Single items and collections
REST Resources Many to many Relations
REST Resources Relations expansion
HTTP Status Codes Success (2xx)
HTTP Status Codes Redirection (3xx)
HTTP Status Codes Client Error (4xx)
HTTP Status Codes Server Error (5xx)
Pagination Out of range/bounds
Long-running Operations Example
Concurrency vs Delete operation
Caching and conditional requests About
Caching and conditional requests Rules
Caching and conditional requests HTTP headers
Error handling Example with a single error
Error handling Example with multiple errors
Error handling Example with parameters
Error handling Example with additional metadata
Bulk operations HTTP status codes
Bulk operations Resources naming convention
Bulk operations Creation example
Bulk operations Update example
Bulk operations Create and update example
File upload Simple file upload
File upload Simple file upload example
File upload Complex file upload
File upload Complex file upload example
REST Security General recommendations
REST Security Insecure direct object references