Analytics API Codes
The Analytics API uses the following response codes and error messages. The following table provides the list of response codes and their descriptions, along with possible causes and remediation.
| HTTP Status Code | Description | Potential Causes | Troubleshooting Steps |
|---|---|---|---|
| 200 OK | The request was successfully received by OneAPI, but one or more GraphQL queries within the request failed. The error information is available in the |
|
|
| 401 Unauthorized | The request lacks valid authentication credentials, or the access token provided is invalid. |
|
|
| 403 Forbidden | The request is correctly authenticated, but the API client does not have the necessary permissions to access the requested resource or data. |
|
|
| 400 Bad Request | The request could not be understood by the server due to malformed syntax. |
|
|
| 500 Internal Server Error | An internal server error occurred while processing the request. | N/A | N/A |
- Single query isolation: If a multi-domain query fails, isolate the individual queries to determine which specific domain or function is causing the error.
- Introspection check: If you receive errors for all queries, try using GraphQL schema introspection in your API client application, if supported. To learn how to use introspection in Postman, see Working with the Analytics API. A successful introspection confirms that authentication and connectivity to the endpoint are working correctly.
Error Response Structure
Errors are reported in the response body in the errors array. When a query fails, the HTTP response code can still be 200 OK. This is generally caused by failures in the service.
The following example shows the error format:
{
"errors": [
{
"message": "Data fetching Failed: Forbidden to use API",
"locations": [
{
"line": 51,
"column": 9
}
],
"path": [
"WEB_TRAFFIC",
"protocols"
],
"extensions": {
"code": "FORBIDDEN",
"http_status": 403,
"classification": "INTERNAL_ERROR"
}
}
],
"data": {
"WEB_TRAFFIC": {
"protocols": {
"entries": []
}
}
}
}