post https://api.motioncxapps.com/reporting/api/v1/case/aggregates
Case Aggregation
- Authentication required, please visit this page for Authentication How To.
Parameters
- Queues - Queues can be pulled from the Queue API call
- Filter If left blank all values are returned. If fields added only chosen fields will be returned.
- For more information on Filters see: Reporting Filters
- DateFilterField - Any of the specific date fields can be used as a filter.
- StartDateTime - When to start pulling data from API.
- EndDateTime - When to stop pulling data from API.
- RelativePeriodStart - To start query one of multiple days in the future, 1,2, etc. or to do in past -1, -2, etc.
- RelativePeriodEnd - To end query one of multiple days in the future, 1,2, etc. or to do in past -1, -2, etc.
- RelativeTime Zone For API information about Times Zone, please visit this page on Time Zones.
- When left blank the default is UTC.
- Date ranges can be in ISO format.
- For Additional Date Range information see: Reporting Date Range Handling
- Resolution - Size periods of the request. Can be by quarter hour, 1 hour, or 1 day.
- GroupFields - multiple fields connected to return in one row/count
- Ex. "AgentId", "FirstAcceptedQuarterHourUtc"
- Aggregates - See Reporting Aggregation
- It is recommended advanced filter object be done outside of the API document for best results.
Responses available:
- 200
- 401
- 403
Example return:
{
"startDateTime": "2022-07-27T04:00:00.000Z",
"endDateTime": "2022-07-28T03:59:59.999Z",
"dateFilterField": "FirstAcceptedAtUtc",
"groupFields": ["AgentId", "FirstAcceptedQuarterHourUtc"],
"aggregates": {
"_id": ["Count"],
"AnsweredApplied": ["Sum"],
"AcceptTime": ["Sum"]
},
"queues": [],
"filter": { "ChannelType": { "$ne": 0 }, "AgentId": { "$ne": null } },
"RelativeTimezone": "America/Toronto"
}