Hey everyone,
I’m trying to build a custom interval report using the /api/v2/analytics/conversations/agg endpoint. The goal is to pull conversation metrics for specific time windows so I can correlate them with our OpenTelemetry spans. I’ve got the OAuth token sorted, and the trace context is propagating fine into the request headers (X-Request-Id, etc.), but the response payload is always returning an empty data array.
Here is the JSON body I’m sending:
{
"interval": "PT1H",
"groupBy": ["conversation.id"],
"select": ["conversation.duration:sum"],
"where": {
"path": "conversation.startTime",
"operator": "between",
"value": ["2023-10-01T00:00:00.000Z", "2023-10-01T23:59:59.999Z"]
},
"size": 100
}
The API returns a 200 OK status, which is confusing. No validation errors, no 400s. Just:
{
"data": [],
"paging": {
"total": 0,
"pageSize": 100
}
}
I’ve verified that there are definitely conversations in this time range by checking the UI. I also tried changing the groupBy to just ["queue.id"] with the same result. Is there a known issue with the between operator in the where clause for this endpoint? Or maybe the timezone handling on the value array is strict about the format?
I’ve been staring at this for hours. The documentation says the where clause supports between, but maybe I’m missing a required field or the date format needs milliseconds? Any ideas on what could be filtering out all results?