Trying to spin up a custom interval report against the /api/v2/analytics/conversations/aggregates endpoint. the goal is just to grab conversation counts grouped by 15-minute buckets over the last 48 hours. sending a POST with this payload:
{
"queryType": "conversation",
"interval": "PT15M",
"dateFrom": "2023-10-25T12:00:00Z",
"dateTo": "2023-10-27T12:00:00Z",
"groupings": [{"type": "interval"}],
"aggregations": [{"type": "count"}],
"selectionCriteria": {"selectors": [{"type": "conversation", "predicate": "mediaType==voice"}]}
}
getting a 400 back every time. the response body claims Invalid interval format even though PT15M matches the spec. it’s weird because the swagger docs show exactly that format. tried swapping to PT1H just to test, same error. also noticed if i drop the selectionCriteria entirely it actually works, but then i’m pulling in every single interaction type which bloats the lambda memory way too fast.
anyone else hit this when filtering for just voice conversations? the predicate field in the docs is pretty vague on what the actual filter string should look like. i’ve been guessing at mediaType==voice but that might be breaking the parser. the interval error feels like a red herring since it only triggers when the selector is attached. just need the exact syntax for the selector predicate that plays nice with interval grouping. the docs are missing the actual examples again.