Import & Export
Zerq supports bulk import and export of collections as JSON. Use this to copy configurations between environments, back up your API catalog, or migrate from another gateway.
Exporting collections
Export a single collection
- Open the collection detail page
- Click Export (download icon)
- A JSON file is downloaded containing the full collection and all its proxies
Bulk export
- Go to the Collections list
- Check the boxes next to the collections you want to export
- Click Export Selected
- A single JSON file is downloaded with all selected collections
Importing collections
- Go to Collections
- Click Import
- Upload the JSON file
- Choose the import mode:
| Mode | Behavior |
|---|---|
| Merge | Add new collections; update existing ones if IDs match |
| Replace | Delete all existing collections and replace with the imported set |
Replace mode permanently deletes all existing collections. Use with caution.
- Click Import to confirm
All imported proxies are created in draft status regardless of their status in the export file. Review and publish them after import.
JSON format
The export format is a JSON array of collection objects:
[
{
"name": "Payments API",
"description": "Payment processing endpoints",
"base_path": "/payments",
"endpoint": "https://payments.internal",
"status": "published",
"proxies": [
{
"name": "List Transactions",
"path": "/transactions",
"methods": ["GET"],
"target_path": "/v2/transactions",
"status": "published"
}
]
}
]
Methods on import
Each proxy's methods are read the same way on every JSON import, so exports from older versions still import:
- Methods are upper-cased and de-duplicated (
["post", "POST", "get"]becomes["POST", "GET"]). - Entries that are not strings or not one of
GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONSare dropped. - A missing or empty list, or one with nothing valid left, becomes
["GET"].
When an import updates an existing collection (update=true on the import API), an imported proxy updates the existing proxy with the same path whose methods include the imported proxy's first method, whatever case the stored method has. Otherwise it is created as a new proxy.
Workflows on import
Imported workflows arrive turned off: each proxy's workflow_definition is imported, but workflow_enabled from the file is ignored, so nothing runs until someone turns the workflow on (the Active switch on the proxy's workflow page, or PUT /api/v1/proxies/:id/workflow {"workflow_enabled": true}). When an import updates or replaces an existing proxy, that proxy keeps its own on/off state.
Check the imported methods before publishing workflow proxies: the gateway rejects every method outside a proxy's allowed methods with 405, also before a workflow runs.
Use cases
Promote from dev to production
- Export the collection from your dev environment
- Import it into production with Merge mode
- Review and update the target endpoint (dev backend → prod backend)
- Attach production credentials
- Publish
Backup
Regularly export all collections and store the JSON files in version control or object storage.
Migrate from another gateway
Export your API configuration from another gateway, convert it to Zerq's JSON format, and bulk import. Use the OpenAPI import for gateway configs that can be exported as OpenAPI specs.