Hey everyone,
Trying to pull some reporting for our healthcare queues to see which actions are being used most often. FWIW, I’ve got the Python SDK (v2.11.0) set up and OAuth is working fine, but the data just isn’t showing up.
Setup
- Using a Client Credentials grant.
- Target is a specific set of queues with HIPAA recording turned on.
- Calling the aggregate endpoint to get counts.
The Problem
The API call returns a 200 OK, but the results array is totally empty. It’s not throwing a 400 or 500, it’s just… nothing. YMMV, but I’ve tried changing the interval to cover the last 30 days and still getting blank results.
Code Snippet
import PureCloudPlatformClientV2
# setup client
api_instance = PureCloudPlatformClientV2.AnalyticsApi()
query_body = {
"interval": "2023-10-01T00:00:00.000Z/2023-10-31T23:59:59.999Z",
"groupBy": ["actionId"],
"metrics": ["nCount"]
}
try:
# calling the aggregate query endpoint
result = api_instance.post_analytics_actions_aggregates_query(query_body)
print(result)
except Exception as e:
print(f"Error: {e}")
Log Output
{'results': [], 'count': 0, 'status': 'completed'}
I tried using POST /api/v2/analytics/actions/aggregates/jobs since I thought maybe the query was too big and needed to be asynchronous, but the job finishes instantly and the results are still empty. Not sure if it’s a permissions thing or if I’m confusing the action aggregates with something else in the analytics suite.