Trying to pull real-time queue stats to feed into our OpenTelemetry dashboard. We need the exact number of contacts waiting and agents available right now, not an aggregated interval.
I’m hitting GET /api/v2/analytics/queues/observations with a query for the last minute. The response comes back with a 200 OK, but the waiting count is always 0, even when I know there are people in the queue. The agentsAvailable looks correct though.
Here’s the query body I’m sending:
{
"interval": "PT1M",
"groupBy": ["queueId"],
"aggregations": {
"waiting": {"type": "sum"},
"agentsAvailable": {"type": "current"}
}
}
The span shows the request completed successfully, but the data is stale or just missing. Is there a different endpoint I should be using for true real-time state? The docs are vague on the difference between observations and queues stats for live data.
Checked the interval format a dozen times. It’s valid ISO 8601. Just wondering if waiting isn’t supported in this aggregation type or if I need to inject a specific header to force a fresh read.