Move a collection and its environments to another server
Sometimes a collection has to change homes. You tried Requestarium on a local install and now the team signs up in the cloud. Security says API work moves to the company's self-hosted server. A contractor's collection belongs in the client's organization now. Requests alone are easy to move; the environments that make them run, and the secrets in them, need a little care.
1. Export with environments
On the old server, right-click the collection ▸ Export as… ▸ Requestarium JSON. The dialog offers your environment groups; the ones whose variables the collection uses are already ticked. Requestarium JSON is lossless: auth settings, collection and folder variables, scripts, assertions and docs all come along.
2. Decide how secrets travel
By default secret values are exported empty, and the variables arrive on the new server with names but no values. That's the safe choice. Someone fills them in once, from your password manager or secret store.
If there are many secrets and you'd rather not retype them, tick Include secret values. Then:
- the file holds those secrets in plain text, so don't email it, upload it to a ticket, or commit it;
- move it directly, import it, and delete it from your disk and downloads folder.
3. Import on the new server
Sign in to the new server, then Import ▸ Import file… and pick the export. The preview shows the collection, its folders and requests, and the environments; import into a New collection. Secrets in the file go into secret environment variables, encrypted on the server.
With the CLI and a profile per server, the requests part can be scripted:
requestarium export "Users API" --out users.json --profile old
requestarium import users.json --profile newThe CLI export never includes environment values, so set environments up in the app, or with requestarium env set ... --profile new.
4. Check before you switch
Run the collection on each server against the same target and compare:
requestarium run-collection "Users API" --env Staging --profile old --out old.json
requestarium run-collection "Users API" --env Staging --profile new --out new.json
jq -r '.results[] | "\(.path) \(.status)"' old.json > old.txt
jq -r '.results[] | "\(.path) \(.status)"' new.json > new.txt
diff old.txt new.txt && echo "Same results"A request that passes on the old server and errors on the new one usually has an empty variable: missingVariables in the JSON report names it.
What doesn't move with the file
- People and permissions. Invite members and set roles on the new server.
- History: run history, response history and the collection's version history stay where they were.
- Links: share links, mock server URLs, trigger URLs and badges point at the old server. Create them again and update wherever they're used.
- Repository sync. If the collection is synced with Git, link the repository on the new server instead of exporting; the files in the repository are already the collection.
Moving a whole organization
For everything at once (members, roles, workspaces, the audit log) start with the organization export. It's the record of who had what; collections still come over as files, as above.