Trying to pull real-time queue observation data (waiting count, agents available) via the Statistics API. We’ve got a custom monitoring dashboard that polls these metrics every 5 seconds. The goal is to alert supervisors when queue depth exceeds 10.
I’m using a script with the REST Proxy action. The endpoint is:
GET /api/v2/analytics/queues/realtime
The request headers include the Bearer token and Content-Type: application/json. The query parameters are:
groupBy: queueIddateFrom: [current ISO timestamp]dateTo: [current ISO timestamp]interval: PT5S
The issue is that the response is often empty. Sometimes it returns a 204 No Content. Other times, it returns a 200 OK but with an empty entities array in the JSON payload:
{
"entities": [],
"pageSize": 25,
"pageNumber": 1,
"total": 0,
"links": {}
}
I’ve tried adding metricNames: waitTime, waitCount, availableAgents. No change. The token is valid. I can see the queue ID in the debug logs. It matches the one in the UI.
Clock skew is not the issue. We checked with the NTP server. The timestamps are within 100ms of the platform time.
Another thing I noticed is that if I use the same endpoint in the Postman collection provided by the dev team, it works. But in the script, it fails. The difference might be the way the REST Proxy handles the query string. I’ve tried URL encoding the parameters. I’ve tried passing them as a raw query string. Same result.
We’ve also tried using the /api/v2/analytics/queues/realtime/summary endpoint. Same problem. Empty entities.
Is there a specific header or parameter that’s required for real-time data? The documentation doesn’t mention it. I’ve been stuck on this for two days. Any help would be appreciated.