Building a dashboard to show real-time queue health (waiting count, agents available) for our Manila operations. We’re hitting the /api/v2/analytics/queues/summary endpoint.
The docs mention a realtime parameter to force a fresh query instead of using cached data. We’ve set realtime=true in the request body, but the response seems to lag by at least 30-45 seconds compared to the PureCloud admin UI.
Here’s the curl command we’re using for testing:
curl -X POST https://api.mypurecloud.com/api/v2/analytics/queries/queues/summary \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"dateFrom": "2023-10-27T08:00:00.000Z",
"dateTo": "2023-10-27T08:00:00.000Z",
"intervalType": "minute",
"groupings": ["queueId"],
"metrics": ["queuedCalls", "agentsAvailable"],
"realtime": true
}'
The response comes back with 200 OK, but the queuedCalls metric is consistently lower than what agents see on screen. Is there a specific header or query parameter needed to bypass the aggregation layer entirely? Or is realtime just a soft hint for the backend?
We’re using the Python SDK v2.1.0 for the production integration, but the curl test shows the same lag. Timezone is Asia/Manila.