Running into a weird issue where the Analytics API seems to ignore my interval configuration when I query via the Kotlin SDK. I’m trying to build a custom report that pulls conversation aggregates in 5-minute buckets for the last 24 hours. The endpoint is POST /api/v2/analytics/conversations/queues/aggregates.
I’ve constructed the request body following the documentation, ensuring the interval field is set to PT5M. Here’s the JSON payload I’m sending:
{
"interval": "PT5M",
"dateFrom": "2023-10-25T00:00:00.000Z",
"dateTo": "2023-10-26T00:00:00.000Z",
"groupings": ["conversationId"],
"metrics": {
"answeredCount": {},
"abandonCount": {}
}
}
The API returns a 200 OK, which is fine, but the entities array in the response contains objects where the interval property is null or missing entirely. Instead of getting 288 separate buckets (5 mins * 4 hours * 24… wait, no, 288 for 24 hours), I’m getting a single entity with the full date range aggregated. It’s as if the interval parameter is being stripped out or ignored by the backend.
I’ve checked the genesys-cloud-kotlin SDK version (v2.18.0) and verified that the AnalyticsQuery object is being serialized correctly before sending. The dateFrom and dateTo are in UTC, which should be correct. I even tried hardcoding the interval in the raw HTTP request using OkHttp to rule out SDK serialization issues, but the result is identical.
Is there a specific flag or additional field required to enable interval splitting for conversation aggregates? Or is this a known limitation with the Kotlin SDK’s handling of ISO 8601 duration strings? I’ve looked at the API docs but they don’t mention any prerequisites for using intervals other than the dateFrom and dateTo fields.