Analytics API 413 Entity Too Large on 90-day query in Kotlin

What’s the right way to break up a date range that triggers a 413 Entity Too Large response from the Genesys Cloud Analytics API? We’re pulling conversation metrics for the last 90 days using the Kotlin SDK (genesyscloud-analytics v2.1.0), but the request body gets rejected before it even hits the server logic. The JSON payload for the query object seems to exceed the limit when we include all the groupings and time intervals.

Here’s the setup:

val query = AnalyticsQuery(
 dateFrom = "2023-10-01T00:00:00.000Z",
 dateTo = "2023-12-30T23:59:59.999Z",
 groupBy = listOf("conversationType", "routingQueueId")
)
val response = analyticsApi.getConversationsMetricsQuery(query)

The error is immediate. No useful details in the response body, just the 413 status. We’ve tried reducing the groupBy fields, but the date range is the real culprit. Splitting the query into three separate 30-day requests works, but it feels clunky to manage the pagination and aggregation manually in the app layer. Is there a recommended pattern for handling large date ranges without hitting this wall? We’re running the SDK in America/Chicago time, so timezone offsets aren’t the issue here. Just looking for a cleaner way to structure the request.