We are building a reporting module in our custom agent desktop using the .NET SDK. The goal is to pull interaction data for the last 90 days to show historical trends to the agents.
I am using the GetAnalyticsInteractionsQuery method. When I set the date range to 30 days, the API responds with 200 OK and returns the data. Everything works fine there. But as soon as I change the range to 90 days, the server immediately throws a 413 Entity Too Large error.
I thought maybe the payload size was the issue, so I tried reducing the number of groups in the request body. Still getting the 413. Here is the JSON payload I am sending:
{
"dateFrom": "2023-10-01T00:00:00.000Z",
"dateTo": "2023-12-31T23:59:59.999Z",
"interval": "P7D",
"groupBy": ["mediaType"],
"filter": {
"type": "and",
"clauses": [
{
"type": "field",
"path": "wrapupCode.id",
"op": "eq",
"value": "resolved"
}
]
}
}
The documentation says the maximum date range is 1 year, so 90 days should be allowed. It seems like the API is calculating the potential response size and rejecting it before it even processes the query.
How do we handle this? Should we split the 90 days into three separate 30-day API calls and aggregate the results on the client side? Or is there a pagination parameter I am missing that allows large datasets to stream back?
I don’t want to hit the rate limits if I make three separate calls.