The export job stalls indefinitely when I try to pull more than 30 days of wrap-up code data. I’m using the genesyscloud Python SDK to generate the export and boto3 to push the CSV to S3. The initial API call to /api/v2/analytics/wrappings/queries/export returns a 202 Accepted with a valid href for status polling. I wrote a loop to check the status every 10 seconds until it hits COMPLETE, then fetch the file and write it to my bucket. It works fine for small chunks, but for a full month, the status just sits at PROCESSING for hours and never completes. No error, just silence. Here’s the polling logic:
status = client.api_client.call_api(url, 'GET', headers=auth_headers)
while status['status'] != 'COMPLETE':
time.sleep(10)
status = client.api_client.call_api(url, 'GET', headers=auth_headers)
I’ve checked the Genesys Cloud admin UI and the export isn’t showing up in the history, which is weird. The Terraform state for the integration is clean, so it’s not a permission drift issue. I suspect the query payload is hitting some undocumented timeout or size limit on the backend. Is there a way to chunk the date range in the SDK request body, or should I be using a different endpoint for batch exports? The docs are sparse on large-scale data pulls.