The following table lists the HTTP response status codes for the GET
(retrieve), POST
(create), PUT
(modify), and DELETE
operations.
Response Code | HTTP Operation | Response Body Contents | Description |
---|---|---|---|
200 | GET, PUT, DELETE | Resource | No error, operation successful. |
201 Created | POST | Resource that was created | Successful creation of a resource. The Location HTTP Header can provide a link to the newly created resource. |
204 No Content | POST, PUT, DELETE | N/A | The request was processed successfully, but no response body is needed. |
304 Not Modified | conditional GET | N/A | Resource has not been modified. Used when HTTP caching headers are in play. |
400 Bad Request | GET, POST, PUT, DELETE | Error Message | Malformed syntax or a bad query. |
401 Unauthorized | GET, POST, PUT, DELETE | Error Message | Action requires user authentication. |
403 Forbidden | GET, POST, PUT, DELETE | Error Message |
When authentication succeeded but authenticated user doesn't have access to the resource. |
404 Not Found | GET, POST, PUT, DELETE | Error Message | Resource not found. |
405 Not Allowed | GET, POST, PUT, DELETE | Error Message | Method not allowed on resource. |
406 Not Acceptable | GET | Error Message | Requested representation not available for the resource. |
408 Request Timeout | GET, POST | Error Message | Request has timed out. |
409 Resource Conflict | PUT, PUT, DELETE | Error Message | State of the resource doesn't permit request. |
410 Gone | GET, PUT | Error Message |
Indicates that the resource at this end point is no longer available. Useful as a blanket response for old API versions |
411 Length Required | POST, PUT | Error Message | The server needs to know the size of the entity body and it should be specified in the Content Length header. |
412 Precondition failed | GET | Error Message | Operation not completed because preconditions were not met. |
415 Unsupported Type | POST, PUT | Error Message | Representation not supported for the resource. |
422 Unprocessable Entity | POST, PUT | Error Message |
Used for validation errors |
500 Server Error | GET, POST, PUT | Error Message | Internal server error. |
501 Not Implemented | POST, PUT, DELETE | Error Message | Requested HTTP operation not supported. |