The docs state: “The agentStateHistory endpoint returns a list of state changes for the specified agent during the specified time period.”
I’m trying to pull agent state history for the last 24 hours using the CXone Reporting API (v2). I’ve got a valid OAuth token with the necessary scopes (reporting:report:read). The endpoint is returning a 200 OK, but the result set is empty.
Here’s the request payload I’m sending:
{
"startTime": "2024-05-20T08:00:00Z",
"endTime": "2024-05-21T08:00:00Z",
"interval": "PT1H",
"groupBy": ["agentId"],
"filters": [
{
"fieldName": "agentId",
"fieldValue": "12345678-1234-1234-1234-123456789012"
}
]
}
The agent ID is correct, and the agent was definitely logged in and handling calls during that window. I’ve also tried adjusting the interval to PT15M and removing the groupBy clause, but still getting an empty array.
What am I missing here?