How do I correctly query the CXone Reporting API v2 to get agent state history for the last 24 hours? I’m trying to use the OData endpoint /api/v2/reporting/agents/states but I’m not sure how to structure the $filter parameter for the time range. I’ve tried passing startTime and endTime in the query string but keep getting empty results or a 400 error. Is there a specific ISO format required or do I need to use a different endpoint? Here’s the curl command I’m testing with:
curl -X GET “https://api.niceincontact.com/api/v2/reporting/agents/states?$filter=startTime gt ‘2023-10-27T00:00:00Z’”
-H “Authorization: Bearer ”