HTTP Response Codes
Code | Explanation |
---|---|
200 OK | Request was successful. |
201 Created | Creation of the resource was successful. |
204 No Content | No error. Used when the server does not need to return any information in the response entity. Metadata about the request maybe returned in response headers. |
304 Not Modified | The resource hasn't changed since the client's last read. This could be driven off If-Modified-Since header or Etag. Assuming each entry has an updated date, If-Modified-Since probably makes more sense. |
400 Bad Request | Returned under the following conditions:
|
401 Unauthorized | Authorization required. |
403 Forbidden | Unsupported standard parameter, or authentication or authorization failed. |
404 Not Found | Resource not found. |
405 Method Not Allowed | The method specified in the request is not allowed for the resource. |
409 Conflict | The request could not be completed due to a conflict with the current state of the resource. For example, a client attempts to update an old version of a resource. |
410 Gone | The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. |
412 Precondition Failed | A precondition given in a request header evaluated to false. For example, a PUT request with a If-Unmodified-Since header might return a 412 if a resource was updated after the value of the If-Modified-Since header. |
415 Unsupported Media Type | The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method. |
500 Internal Server Error | The default status code used for all unrecognized server errors. |
503 Service Unavailable | The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. |
Web services will include a descriptive message in the HTTP response entity when returning a HTTP 4xx and 5xx status code.