Trying to pull real-time queue stats via the Statistics API. Specifically looking for waitingCount and agentsAvailable. The goal is to update a dashboard every 10 seconds.
Here’s the request I’m sending:
GET /api/v2/analytics/queues/realtime?from=2023-10-27T10:00:00Z&to=2023-10-27T10:00:10Z
Authorization: Bearer <token>
The response comes back with a 200 OK, but the observations array is empty.
{
"observations": []
}
I’ve verified the queue ID is correct. I can see data in the UI. The time range is small, but the docs say real-time supports short windows. Is there a specific permission I’m missing? Or is the from/to format wrong for real-time endpoints?
I’ve tried widening the window to 1 minute. Still empty. Same for agents endpoint. The token has analytics:view scope.
Any ideas why it’s returning nothing?