AGI Error / Status Codes¶
Both error and success conditions are implemented as standard HTTP status codes. As a convenience, these same codes are also implemented in the body of the response using the code
property. The following are a list of codes currently used:
Code | Description |
---|---|
200 | OK Standard Response for a successful request. However, it doesn't necessarily mean you received exactly what you were expecting. (See expired token) |
400 | Bad Request This occurs if a required parameter is missing or not in the expected format. |
401 | Unauthorized This occurs when the API Key is missing or invalid. |
403 | Forbidden This occurs when trying to access a secure resource insecurity (ie using HTTP when you need to use HTTPS). |
404 | Not Found Occurs if the URI is malformed or the target resource is not available. |
405 | Method Not Allowed This occurs when an unsupported method type is used to request a resource (ie using POST to access the Authentication Service). |
415 | Unsupported Media Type This occurs when a resource is requested in a format that is not supported (ie something other than JSON or XML). |
500 | Internal Server Error Occurs when something failed during the request and we cannot provide a more specific code. In these cases see the message property for further details. |
503 | Service Unavailable The service is temporarily offline. |
504 | Gateway Timeout The service had an internal timeout from one of its upstream servers. |