Can’t get this config to load properly correctly when attempting to retrieve analytics data for a 90-day period via the Genesys Cloud Platform API. The current instrumentation pipeline ingests queue performance metrics into New Relic custom events to populate NRQL dashboards for capacity planning. The requirement mandates a rolling 90-day aggregation of offerCount, answerCount, and talkCount per queue. When the application posts the query payload to POST /api/v2/analytics/queues/summary with the complete interval, the server rejects the request with a 413 status. This failure interrupts the scheduled data collection job, resulting in gaps in the performance visibility.
Request Payload
{
"interval": "P90D",
"groupBy": ["queueId"],
"select": ["offerCount", "answerCount", "talkCount"],
"timeFrom": "2023-10-01T00:00:00.000Z",
"timeTo": "2023-12-30T00:00:00.000Z"
}
Error Response
HTTP/1.1 413 Entity Too Large
Content-Type: application/json
{
"code": "entityTooLarge",
"message": "Request payload exceeds maximum size"
}
Documentation Reference
“Query parameters must adhere to maximum size limits. When requesting data across extended intervals, the client application should partition the
timeFromandtimeToranges into smaller segments to ensure successful processing.”
Current Attempt
I attempted to reduce the select fields, but the 413 error persists, indicating the limit relates to the time interval or internal query expansion rather than the JSON body size alone. The error response confirms the payload rejection.
Question
The documentation suggests partitioning strategies, yet it does not specify the maximum safe interval duration or the preferred chunking mechanism. I am currently evaluating whether to implement a loop that breaks the 90-day span into discrete 7-day segments using P7D intervals. Alternatively, does the API support an offset-based pagination mechanism for date ranges that would mitigate the payload size issue? The integration script runs in a serverless environment, so minimizing the number of API calls while avoiding 413 errors is critical for cost efficiency. I also need to ensure that the groupBy results remain consistent across split queries to allow for accurate deduplication in the New Relic ingestion layer. I require a reliable pattern to execute sequential requests and merge the resulting JSON arrays before forwarding them to the New Relic Insights API. Any code examples demonstrating the interval splitting logic would be appreciated.