Retrieve detailed failed API requests
Use this API to retrieve detailed information about failed API requests. The response includes failure timestamps, endpoint paths, HTTP status codes, latency, user identifiers, and global request IDs.
HTTP method and endpoint
POST /statistics-reporting/{tenantId}/API/getFailedRequests
Replace {tenantId} with the ID of the target tenant.
Request headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Authorization | Bearer {access_token} | Yes |
Request body
| Parameter | Type | Required | Description | Accepted values / Default |
|---|---|---|---|---|
from (1) | Long | Yes | Start time in epoch milliseconds | — |
to (1) | Long | Yes | End time in epoch milliseconds | — |
env | String | Yes | Target environment |
Example: Default: none |
offset | Long | No | Number of rows to skip before applying the max limit | Must be non-negative |
max | Long | No | Maximum number of rows to return | Must be non-negative |
queryTypes | Array | No | Filters by query type |
Default: all |
httpMethods | Array | No | Filters by HTTP methods |
Example: Default: all methods |
apiEndPoints | Array | No | Filters by API paths |
Example: Default: all |
users | Array | No | Filters by user email addresses |
Example: Default: all users |
Note:
| ||||
Example request
curl -X POST https://{baseUrl}/statistics-reporting/{tenantId}/API/getFailedRequests \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from": 1720867200000,
"to": 1721016000000,
"env": "prod",
"offset": 0,
"max": 100,
"httpMethods": ["POST"],
"apiEndPoints": ["/api/tenant123/entities/_search"],
"users": ["user1@example.com"]
}'
Response fields
| Field | Type | Description |
|---|---|---|
RequestTimestamp | Long | Timestamp in milliseconds when the failed request occurred |
API | String | API endpoint path that failed |
httpMethod | String | HTTP method used for the failed request (for example, GET, POST) |
Status | String | HTTP status code returned for the failed request (for example, 400, 404) |
Latency | Float | Response time in milliseconds for the failed request |
User | String | Email address of the user who made the failed request |
GlobalId | String | Unique identifier for the failed request used for tracking and debugging |
Example response
[
{
"RequestTimestamp": 1704100000000,
"API": "/api/tenant123/entities/_search",
"httpMethod": "POST",
"Status": "500",
"Latency": 478.9,
"User": "user1@example.com",
"GlobalId": "1234567890a"
},
{
"RequestTimestamp": 1704101000000,
"API": "/api/tenant123/configuration",
"httpMethod": "GET",
"Status": "403",
"Latency": 127.3,
"User": "user2@example.com",
"GlobalId": "1234567890b"
}
]