Trying to pull agent state history for the last 24 hours using the CXone Reporting API. The endpoint is GET /api/v2/analytics/details/agents. I’m building the request in Python with the requests library, setting the interval parameter to PT24H and groupBy to agentId.
The issue is that the request hangs for about 45 seconds before returning a 504 Gateway Timeout. If I shrink the window to PT1H, it comes back instantly with the data. I’ve tried chunking the query into twenty-four 1-hour blocks, but that’s hitting rate limits pretty fast.
Here’s the header setup I’m using:
headers = {
'Authorization': f'Bearer {token}',
'Accept': 'application/json',
'Content-Type': 'application/json'
}
params = {
'interval': 'PT24H',
'groupBy': 'agentId',
'metric': 'agentStateHistory'
}
Is there a specific query limit for this endpoint that I’m missing? The docs mention a max duration but don’t specify the exact cap for detail queries. We need this data for our shift compliance reports, so polling hourly isn’t really an option.