Retrieve failed queue messages by time interval
Use this API to retrieve the number of failed messages in the queue over a defined time range. The response includes failure counts grouped by subscription topic and timestamp.
HTTP method and endpoint
POST /statistics-reporting/{tenantId}/API/queueMetrics/failedMessages
Replace {tenantId} with the ID of the target tenant.
Request headers
The following request headers must be included.
| 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: prod, qa, dev. Default: none |
resolution | Integer | Yes | Time resolution in milliseconds for aggregating data | — |
subscriptionPattern | String | Yes | Regex pattern to filter queues | Default: * |
Note:
| ||||
Example request
curl -X POST https://{baseUrl}/statistics-reporting/{tenantId}/API/queueMetrics/failedMessages \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from": 1760770800000,
"to": 1760771400000,
"env": "prod",
"resolution": 60000,
"subscriptionPattern": ".*crud.*"
}'
Response fields
| Field | Subfield | Type | Description |
|---|---|---|---|
timestamp | Long | Numeric value representing the start time of the interval in milliseconds | |
values | Array | Array containing one or more name-value pairs | |
| — | name | String | Identifier for the destination or topic |
| — | value | Integer | The number of failed messages during that time interval |
Example response
[
{
"timestamp": 1760770800000,
"values": [
{
"name": "API_na07_prod_crud-events_6ZS1234567ef8b97",
"value": 136421
}
]
},
{
"timestamp": 1760770920000,
"values": [
{
"name": "API_na07_prod_crud-events_6ZS1234567ef8b97",
"value": 97380
}
]
}
]