CXone Reporting API v2: Agent state history query returns empty array for last 24 hours

We are trying to pull agent state history for the last 24 hours using the CXone Reporting API (v2). The goal is to track how long agents spend in specific states like ‘Available’ or ‘After Call Work’.

I have been using the standard OData endpoint for this. The URL structure looks like this:

GET https://api.nicecxone.com/api/v2/analytics/reporting/agent-state-history

I am passing the since and until parameters as ISO 8601 strings. For example, if the current time is 2023-10-27T10:00:00Z, I set:

since=2023-10-26T10:00:00Z&until=2023-10-27T10:00:00Z

The request returns a 200 OK status code. The response body is valid JSON but the items array is always empty. I have verified that agents were active during this window by checking the real-time dashboard.

Here is the response payload I get:

{
 "items": [],
 "page": 1,
 "pageSize": 50,
 "count": 0,
 "totalCount": 0
}

I have tried adding the agentIds filter with a known active agent ID. The result is the same. Empty array.

I also checked the groupBy parameter. I tried grouping by agentId and stateId. No change.

Is there a specific filter I am missing? Or maybe the timezone handling is off? The docs say the timestamps are in UTC but our org is set to US/Pacific. I am sending UTC times so that should be fine.

I have also tried using the SDK method reportingAgentStateHistoryGet but it yields the same empty result.

Any ideas why the history data is not showing up?