HTTP Status Codes

The Sentinel EMS REST API communicates errors through standard HTTP Status Codes. Every API call returns the following in response for success or failure:

>An HTTP status code: Provides the status of the HTTP request—that is, whether the request was successfully completed or not.

>A response body: Contains results of the HTTP request. In case of an error, the response body contains an error code and an error message.

The following table describes the status codes:

Status Code

Description

200 OK

Indicates non-specific success. It must not be used to communicate errors in the response body.

201 Created

Indicates successful resource creation.

202 Accepted

Indicates successful start of an asynchronous action.

204 No Content

Indicates that the response body is intentionally empty.

400 Bad Request

Indicates non-specific failure.

401 Unauthorized

Indicates a problem with the client’s credentials.

403 Forbidden Indicates no permission to access this resource.

404 Not Found

Used when a client’s URI cannot be mapped to a resource.

405 Method Not allowed

Used when the HTTP method is not supported.

429 Too Many Requests Indicates incoming traffic exceeds the threshold. In case of this error, the application should wait for a specific amount of time before sending another request. A Retry-After header is included in the response indicating how long to wait before making a new request. This value is set to 60 seconds.

500 Internal Server Error

Indicates API malfunction.

503 Service Unavailable Indicates that the server is unable to handle the request due to a temporary overloading or maintenance of the server.