How do I fix 504 Gateway Timeout on /api/v2/recording/recordings for weekly QA coaching sync?

How do I fix the 504 Gateway Timeout errors hitting the /api/v2/recording/recordings endpoint every Wednesday at 14:00 PT? The external QA platform keeps timing out when it tries to pull the screen recording metadata for agent coaching reviews. My team of 30 agents is unable to access the compliance clips in the dashboard. The vendor telling us the Genesys endpoint drop the connection after 30 seconds. We need this sync to complete before the afternoon wrap-up meeting. The error log shows gateway_timeout on the retrieval request.

Don’t batch pull in a single call. It’s too heavy for the gateway. Split it into smaller chunks using the maxRecords parameter, or better yet, switch to the Recording Insights API if you just need metadata. Here’s how to paginate safely in Python.

client.recording_api.post_recordingrecordings(
 body=RecordingQueryFilter(max_records=50)
)