Error Handling

The errors returned by the API have a consistent response structure that can be leveraged by the clients to handle errors. The error response structure is described as follows

Field Type Description
name string The error name
id string The unique error ID
message string The error message containing specific details
timeout boolean true if the error is a timeout error, false otherwise
temporary boolean true if the error is a temporary error, false otherwise
fault boolean true if the error is due to a server-side fault, false otherwise

The clients making the API calls can implement any backoff/retry logic by using the timeout, temporary, and fault fields in the error response.

Flexera API returns conventional HTTP response codes for successful and failed API requests. The following table summarizes the response codes returned by the APIs.

Code Summary
200 OK The request succeeded
201 Created The request succeeded and the requested resource was created
204 No Content The request succeeded and no content was sent in the response
301 Moved Permanently The API endpoint URI has changed permanently. The new URI is provided in the Location header in the response.
303 See Other The API request is redirected to another URI to get the requested resource. The new URI is provided in the Location header
304 Not Modified The response has not been modified since the last request.
400 Bad Request The API request is missing required parameters or the given parameters failed validation.
401 Unauthorized The access token is not present in the Authorization header or is expired.
403 Forbidden The user making the request does not have sufficient privileges to perform the action.
404 Not Found The resource requested in the API is not found.
409 Conflict The API request conflicts with another request.
429 Too Many Requests The API request has been rate limited as there were too many requests in a given amount of time.
500 Internal Error The API request failed due to an unknown server-side error.
502 Bad Gateway The API request failed because the server received an invalid response.
503 Service Unavailable The API request failed because the server is down.
504 Gateway Timeout The API request timed out because the server did not respond in time.