CSM 10.2.2 Documentation

Home

Errors

The Cherwell REST API uses conventional HTTP response codes to indicate the success or failure of an API request.

In general:
  • Codes in the 200 range indicate success.
  • Codes in the 400 range indicate a failure error based on the information provided.
Here are a few http codes that you might see:
200 OK. Everything worked as expected.
400 Bad request, often due to a missing required parameter.
402 Request failed. Typically, the parameters are valid but the request failed.
404 Not found. The requested resource does not exist.

Not all errors map cleanly to HTTP response codes. In these cases, check the error message for more information.

For example, if you specify an incorrect client ID, you will get the following response:

                            Status Code 400
"{\"error\":\"invalid_client_id\",\"error_description\":\"Client 12345 is not registered in the system.\"}"

                        

If you supply invalid credentials, you will get the following response:

                            Status Code 400
"{\"error\":\"invalid_grant\",\"error_description\":\
"Could not login to system with the provided user ID and password.\"}"

                        

Was this article useful?