What is the standard approach to build a custom interval report using the Analytics Conversations Aggregates query? i’m trying to fetch data for a specific time range in my python fastapi service but the response is always empty.
the docs say: “The from and to fields must be specified in the request body.” i’m sending this payload via requests.post:
{
"from": "2023-10-01T00:00:00.000Z",
"to": "2023-10-02T00:00:00.000Z",
"groupBy": "conversationId",
"interval": "PT1H",
"filters": {
"and": [
{
"field": "direction",
"op": "equals",
"value": "inbound"
}
]
}
}
the endpoint is /api/v2/analytics/conversations/aggregate. i get a 200 ok but the data array is empty. the token has the analytics:read scope.
i’ve checked the timezone settings in the org. everything looks fine. is there something wrong with the interval format? the docs mention ISO 8601 durations. PT1H should be correct.
also, the groupBy field. the docs say: “Valid values are: conversationId, queueId, skillId.” i’m using conversationId.
any ideas why it’s not returning anything? the date range is definitely in the past. i’m running this on python 3.11 with requests 2.31.0.