Status Codes

When you call any REST resource, the response contains 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.

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

204 No Content

Your request is executed, but the response doesn't have content.

400 Bad Request

Your request couldn't 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 isn't authorized. The authentication credentials included with this request are missing or invalid.

403 Forbidden

You don't have authorization to perform this request. You may not have the necessary roles and privileges to use this REST resource.

Note:

Access to cloud resources is governed by the US Export Laws and is internally monitored by Oracle Global Trade Compliance (GTC). Make sure that you are compliant with the US Export Laws and that you are accessing the REST resource from a location that Oracle permits to access the associated cloud service. Otherwise, you might continue to get the 403 HTTP status code in the response.

404 Not Found

Your request includes a resource URI that doesn't exist.

405 Method Not Allowed

HTTP action specified in the request (DELETE, GET, POST, PUT) isn't supported for this request URI.

406 Not Acceptable

Although the server understands and processes your request, your client can't 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.

409 Conflict

The request couldn't be completed because of a conflict with the current state of the resource. The response body contains an error message with the conflict details. For example, a key constraint violation, such as an attempt to create a duplicate resource, returns this status code.

413 Request Entity Too Large

The request is denied because the requested resource is too large to be served in a single request. The client must make another request with the amount of data requested, which is less than the previous request.

415 Unsupported Media Type

The server refuses to accept the client request because the payload format is unsupported. In your client, the ContentType header isn't 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 doesn't support the method used in the request, and therefore it can't process the request.

502 Bad Gateway

The service is temporarily unavailable.

503 Service Unavailable

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 doesn't receive a timely response from the upstream server to complete the request.

For more information on the status codes, see the Internet Engineering Task Force (IETF) website.