Trying to export all Architect flows using the CX as Code CLI. Ran genesyscloud arch flow export but it only grabs the first 50. The docs don’t mention pagination flags. Here’s the command: genesyscloud arch flow export --org-id 123. Any way to get the full JSON dump without hitting the limit? The output file cuts off mid-array. Need the complete set for backup.
The CLI tool doesn’t support pagination flags for bulk exports yet. You’ll hit that 50-item limit hard if you don’t use the REST API directly.
Here’s how to fetch the full list using the Genesys Cloud Platform API. You can script this in Python or Node to handle the nextPage token.
curl -X GET "https://api.mypurecloud.com/api/v2/architect/flows?page_size=100" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
Check the nextPage field in the response JSON. Loop until it’s null. The CLI is convenient for single flows, but for a full backup, the API gives you control over the rate limits and data shape.
Also, watch out for flow dependencies. Exporting just the flow JSON won’t get your custom functions or data actions. You might need to export those separately to keep the backup usable. I usually run a cron job to hit this endpoint every night and push the JSON to an S3 bucket. It’s more work than a CLI command, but it actually works.