Hey everyone,
Running into a wall with the Analytics API. We’re trying to pull historical wrap-up code data for a quarterly review, so I set the time range to cover the last 90 days. The endpoint is /api/v2/analytics/queues/events/summary.
When I send the request with a groupBy on wrapupCode and agent, the server immediately responds with a 413 Entity Too Large. I’ve seen this happen before with massive intervals, but 90 days doesn’t seem that huge. The payload size itself is small, just the query parameters.
Here’s the JSON body I’m sending:
{
"groupBy": ["wrapupCode", "agent"],
"interval": "PT1H",
"select": ["talkDuration"],
"filter": {
"type": "and",
"clauses": [
{
"type": "range",
"field": "time",
"from": "2023-01-01T00:00:00.000Z",
"to": "2023-03-31T23:59:59.999Z"
}
]
}
}
I tried breaking it down into 30-day chunks using multiple sequential calls, but that feels like a hack. Plus, aggregating the results client-side is messy with the way the intervals overlap at the boundaries. Is there a specific header or parameter I’m missing to handle larger datasets? Or is this a hard limit on the query complexity for summary endpoints?
We’ve got a few hundred agents and dozens of wrap-up codes, so the result set shouldn’t be astronomical, but maybe the intermediate processing is hitting a memory cap on Genesys’ side.
Also, I noticed if I remove the groupBy on agent, it works fine. That points to the cardinality of the result set being the issue rather than just the time range. Any tips on how to structure this query to avoid the 413 without having to manually stitch together a dozen API calls?