Retrieve average queue dwell time by interval
Use this API to retrieve the average time that messages remained in the queue during each time interval. The response includes average dwell time values grouped by topic and timestamp across the specified time range.
HTTP method and endpoint
POST /statistics-reporting/{tenantId}/API/queueMetrics/avgTimeInQueue
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 | No | Regex pattern to filter queues | Default: * |
Note:
| ||||
Example request
curl -X POST https://{baseUrl}/statistics-reporting/{tenantId}/API/queueMetrics/avgTimeInQueue \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from": 1760770800000,
"to": 1760771400000,
"env": "prod",
"resolution": 60000
}'
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 for which the metric was aggregated |
| — | value | Integer | The average queue dwell time during that time interval |
Example response
[
{
"timestamp": 1760770800000,
"values": [
{
"name": "A",
"value": 136421
}
]
},
{
"timestamp": 1760770920000,
"values": [
{
"name": "A",
"value": 97380
}
]
}
]