Cortex response status codes and their definitions
Response Status Codes
Cortex returns HTTP status codes to indicate the API request succeeded or failed. Generally, codes in these ranges mean the following:
2xx
Success3xx
Redirection4xx
Client Error5xx
Server Error
2xx
Success
200 OK
The request is successful.
Returns for these request methods:
GET
: The request completed successfullyPOST
: The request successfully updated an existing resource
201 Created
Content created in resource.
Returns for this request method:
POST
: The request successfully created a new resource
204 No Content
Cortex completed the request but didn’t return an body. Returns for these request methods:
PUT
: The request completed successfullyDELETE
: The request completed successfully
3xx
Redirection
307 Temporary Redirect
The resource is not at the specified URI.
Returns when:
- The request URI uses the default parameter
- The requested resource has changed
- The client application should use URL indicated in the Location header to retrieve the resource from it’s new location
4xx
Client Error
400 Bad Request
The URI is malformed.
This response code is returned when:
- The request has a malformed request body
- A request parameter has an invalid value
- A request parameter that is required is missing
- A request parameter is duplicated
- The requested resource is not a defined Cortex resource
- The client application should resolve the problems mentioned in the response before re-sending the request
401 Unauthorized
Unauthorized access to resource.
Returns when:
- The request does not have an authentication header set
- The request has an invalid or expired authentication header
403 Forbidden
Forbidden. Indicates the request cannot be completed.
Returns when:
- The authenticated user does not have authority to perform the action
- The requested resource is for an unsupported scope
- The request resource is defined, but the request URL does not match a supported pattern
- An identifier used in the request URL is not a valid identifier
404 Not Found
Cortex cannot find the request URI.
Returns when:
- The requested resource does not exist
405 Method Not Allowed
Method not allowed.
Returns when:
- The request method is not supported by this resource
409 Conflict
Cortex cannot complete the request due to a conflict
Returns when:
- The request cannot be completed because it conflicts with a rule on the server
415 Unsupported Media Type
Unsupported media type.
Returns when:
- The request does not have a content-type header set
- The request does not have a content-type header set to
application/json
5xx
Server Error
500 Internal Server Error
Internal server error.
Returns when:
- An unrecoverable server error occurs
501 Not Implemented
Not implemented.
Returns when:
- The requested resource has not been implemented yet
503 Service Unavailable
Specified resource is not available.
Returns when:
- The requested resource server has not started yet or is temporarily unavailable