Statistics API returning empty waiting count for real-time queue observation

We’re hitting a wall trying to pull live queue metrics for our dashboard. The goal is simple: show the number of people waiting and agents available in real-time. I’m using the POST /api/v2/analytics/queues/observations/query endpoint as documented, but the waiting count always comes back as zero, even when I can see calls stacking up in the PureCloud UI.

Here’s the request setup. I’m passing the date_from and date_to parameters in the body to define a 1-minute window for the current time. The timestamp format looks right based on the docs.

import requests
import jwt
from datetime import datetime, timedelta

# ... auth token generation omitted ...

headers = {
 'Authorization': f'Bearer {token}',
 'Content-Type': 'application/json'
}

now = datetime.utcnow()
window_start = (now - timedelta(minutes=1)).strftime('%Y-%m-%dT%H:%M:%S.000Z')
window_end = now.strftime('%Y-%m-%dT%H:%M:%S.000Z')

payload = {
 'date_from': window_start,
 'date_to': window_end,
 'group_by': 'QUEUE'
}

response = requests.post('https://api.mypurecloud.com/api/v2/analytics/queues/observations/query', headers=headers, json=payload)
print(response.json())

The response structure is valid JSON, no 4xx or 5xx errors. It returns a list of queues. But inside the metrics object, waiting is consistently 0. The agents_available seems to fluctuate correctly.

I’ve double-checked the queue ID. I’m also trying to fetch the queue definition to verify the ID, but that only gives me the static configuration, not the live stats.

Is there a specific interval parameter I need to set for the observations query? The docs mention interval but don’t give examples for this specific path. Or is this API just meant for historical data and I’m looking in the wrong place for live stats?

I’ve tried changing the group_by to NONE but that just aggregates everything. We need per-queue data. Any ideas why the waiting count is flatlining?