Running genasys-cx-as-code export-architect against our production org is consistently failing after about 45 seconds. We’ve got a pretty complex setup with over 200 Architect flows, so I figured the CLI might just be slow, but it’s actually throwing a connection reset error.
INFO[0001] Starting export for Architect flows
INFO[0002] Fetching flow list from /api/v2/architect/flows
WARN[0045] Request timeout: context deadline exceeded
ERROR[0045] Failed to export flows: Get "https://api.mypurecloud.com/api/v2/architect/flows": context deadline exceeded
I’ve verified the authentication token is valid by running a simple curl against /api/v2/users/me, which returns 200 OK instantly. The issue seems specific to the bulk export logic in the CLI tool.
Looking at the source code for the genesys/cx-as-code provider on GitHub, the export function appears to make a single GET request to /api/v2/architect/flows without pagination parameters. If the response payload is too large, the HTTP client might be timing out or the server might be truncating it.
I tried adding --timeout 300s to the command, but it doesn’t seem to be recognized. The help text only shows --org-id and --auth-token.
Is there a way to force the CLI to use pagination or chunk the export? Or should I just write a quick Kotlin script to handle the pagination manually using the after cursor from the response headers? I’d rather not reinvent the wheel if the CLI supports it.
Also, I noticed the terraform-provider-genesyscloud has a data source for architect flows, but that’s not really suitable for exporting the full JSON definition for backup purposes. We need the actual JSON blobs, not just the IDs.
Any workarounds for this? I’m in America/Chicago timezone, so I can’t stay up late debugging this further tonight.