I’ve been trying to automate the backup of our entire Architect flow library using the CX as Code CLI, specifically the genesyscloud arch export command. The goal is to dump everything into a local directory for version control, but I’m hitting a wall with a handful of high-complexity flows.
The command runs fine for simple IVR menus, but when it hits our main sales routing flow, which has about 150 nodes, the CLI just hangs for a minute and then spits out a 500 Internal Server Error. The logs don’t give much context other than a generic server failure, which is frustrating because the same flow exports perfectly fine through the web UI.
Here’s the exact command I’m running:
genesyscloud arch export --flow-id 12345-abcde-fghij --output-dir ./flows
I’ve tried increasing the timeout via environment variables, but that doesn’t seem to help. I also checked the network tab in the browser while exporting via the UI, and I noticed the API call uses a different endpoint structure than what the CLI seems to be hitting based on the error trace. The UI calls /api/v2/architect/flows/{id}/export, but the CLI error suggests it’s timing out on a resource-intensive query.
Is there a known limitation with the CLI exporter for flows with large amounts of custom data or complex conditional logic? I’m running version 1.32.0 of the CLI. I tried splitting the export by flow groups, but the issue persists on any flow that exceeds a certain node count.
I’ve also tried using the REST API directly with a simple curl command to see if I can bypass the CLI entirely, but the response payload is truncated if the flow is too large. I need a way to get the full JSON definition without hitting this server-side limit. Any ideas on how to force a full export or chunk the response?