Cortex Client Developer Documentation

Response Status Codes

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 - Success
  • 3xx - Redirection
  • 4xx - Client application errors
  • 5xx - Indicate Cortex server errors.
The complete definition of HTTP status codes is available here.

Standard Cortex HTTP Status Codes

Response Code

Definition

Usage

200 OK

The request is successful.

Returns for these request methods:
  • GET: The request completed successfully.
  • POST: 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 successfully.
  • DELETE: The request completed successfully.

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.

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

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.