Having some config trouble here…
I am building a daily analytics export job using the Genesys Cloud Python SDK and boto3. The goal is to pull conversation metrics via /api/v2/analytics/conversations/queries and stream the results directly to an S3 bucket in the ap-southeast-1 region.
The Python script authenticates correctly and constructs the query payload. However, when I invoke the SDK method post_analytics_conversations_queries, the response body is consistently empty, even though I know data exists for the requested time range. I am using a service account with full analytics permissions.
Here is the core logic:
client = genesyscloud.init(config=cfg)
body = {
"interval": "PT1H",
"dateFrom": "2023-10-27T00:00:00.000Z",
"dateTo": "2023-10-27T23:59:59.999Z",
"groupBy": ["conversation.type"],
"view": "default"
}
response = client.analytics.post_analytics_conversations_queries(body=body)
The HTTP status code is 200 OK, but response.body contains no data arrays. I suspect the date format or the view parameter is incorrect. Does the Python SDK require a specific ISO 8601 format with timezone offsets? Or is the default view insufficient for this query type? I need to ensure the data stream is valid before writing to S3.