Status Codes

When you call any REST resource, the response header returns one of the standard HTTP status codes listed in the following table. These status codes refer to a three-digit number in the response header that indicates the general classification of the response. For example, the codes indicate whether the request was successful (200s), or resulted in a client (400s) or server (500s) error. The 400 and 500 classes of status codes help in troubleshooting bad requests.

HTTP Status Code Description
200 OK Success! A successful GET or POST method returns a 200 status code.
201 Created

Your request is successful and a new resource has been created. Response includes a Location header containing the canonical URI for the newly created resource.

You receive a 201 status code from:
  • A synchronous resource creation
  • An asynchronous resource creation that completed before the response was returned
202 Accepted The server has accepted your request for processing, but has not yet completed processing it. Your request might be accepted or rejected during processing.
400 Bad Request Your request could not be processed because it contains missing or invalid information, such as a validation error on an input field, a missing required value, and so forth.
401 Unauthorized Your request is not authorized. The authentication credentials included with this request are missing or invalid.
403 Forbidden You do not have authorization to perform this request. You may not have the necessary roles and privileges to use this REST resource.
404 Not Found Your request includes a resource URI that does not exist.
405 Method Not Allowed HTTP action specified in the request (DELETE, GET, POST, PUT) is not supported for this request URI.
406 Not Acceptable Although the server understands and processes your request, your client cannot understand the server response because it's unsupported. A client's request header indicates what data or media types are acceptable. For example, the client's Accept header requests that XML be returned, but the server can return only JSON.
415 Not Acceptable Indicates that the server refuses to accept the client request because the payload format is unsupported. In your client, the ContentType header is not correct. For example, the client attempts to send the request in XML, but the server can accept only JSON.
500 Internal Server Error The server encountered something unexpected that prevented it from completing the request.
501 Not Implemented

Indicates that the server does not support the method used in the request, and therefore it cannot process the request.

503 Service Unavailable Indicates that the server is unable to complete the request due to a server overload. This condition is usually temporary.
504 Gateway Timeout

The server acts as the gateway and does not receive a timely response from the upstream server to complete the request.

For more information see the Internet Engineering Task Force (IETF) website.