Import / Export
Import / Export
Use Import / Export in the Admin panel header to copy configuration from one CoreIQ installation to another, for example from test to production. An export produces a .crq package file; an import reads one. A package is not a database backup: it leaves out user credentials, the Hub and AI API keys, endpoint settings that look like secrets, and change data capture history.
Export
- Under What to export, choose the installation configuration (hosts and endpoints, settings, common regex patterns) and the catalog contents: CICS, IMS, IMS-DB, IMS-DLI, Datasets, DB2, DB400, Models and Flows. You can narrow the choice to particular hosts and catalogs.
- Catalog contents include record layouts and models, table and query API definitions, flows and their publish state, CDC settings and IMS-DLI PSB definitions. Datasets keep their tags, layout names and key positions. AS400 RPC catalogs are not exported, with a warning.
- Under Sign with, choose a signing key or Do not sign. Signing needs
IMPORT_EXPORT_SIGN_KEYSTORE. - Export stays off until something is chosen.
Import
- Upload or drop a package. CoreIQ shows what it would create, update or skip, without changing anything.
- For each host and catalog choose Import, Update (overwrites existing entries and adds new ones), Replace (deletes existing entries first), import under a new name, or Skip. Entries filed under a host that is not in the package can be assigned to one of your hosts.
- Common regex patterns get one answer for the whole set: Update, Replace (deletes every pattern here first; the dialog names the ones that would be lost) or Skip.
- Check again refreshes the plan against the installation as it is now, without writing anything.
- Signed packages are always verified; an altered package is refused. Keys are trusted when they are in your keystore or in
IMPORT_EXPORT_TRUSTED_KEYS. SetIMPORT_EXPORT_REQUIRE_SIGNATURE=trueto refuse unsigned or untrusted packages. - An import never starts change data capture.
While an import or export runs (usually a few seconds), other requests answer HTTP 503 with Retry-After; /health keeps answering.
Scripting with cURL
Everything the dialog does is an admin API call under /api/admin/import-export/, authenticated with the admin passkey in an x-admin-passkey header.
Let the dialog write it: make your choices and click API request. CoreIQ shows the exact commands for what is on screen, with Copy. Set Base URL to the installation the script will run against. Spell every choice out (on by default) names every section, host and catalog explicitly, so the command does the same thing later even if the installation grows.
export COREIQ=https://coreiq.example.com:8090
export ADMIN_PASSKEY='<admin passkey>'
Export
# Whole installation; -OJ keeps the server's file name, --fail turns a refusal into an error
curl --fail -OJ "$COREIQ/api/admin/import-export/export" \
-H "x-admin-passkey: $ADMIN_PASSKEY"
# Some sections, signed
curl --fail -OJ "$COREIQ/api/admin/import-export/export?sections=hosts,settings,cics,db2&signWith=release-key" \
-H "x-admin-passkey: $ADMIN_PASSKEY"
Section ids: hosts, settings, regex-patterns, cics, ims, ims-db, ims-dli, datasets, db2, db400, models, flows. Leaving sections out exports everything; an unknown id answers 400.
To narrow by host, endpoint or catalog, POST the selection. Hosts and endpoints are named, catalogs are identified by id, and catalogHosts takes only the entries given hosts filed in a catalog:
# Names, catalog ids and counts; and the keys you can sign with
curl --fail "$COREIQ/api/admin/import-export/contents" -H "x-admin-passkey: $ADMIN_PASSKEY"
curl --fail "$COREIQ/api/admin/import-export/signing-keys" -H "x-admin-passkey: $ADMIN_PASSKEY"
curl --fail -OJ -X POST "$COREIQ/api/admin/import-export/export" \
-H "x-admin-passkey: $ADMIN_PASSKEY" \
-H "Content-Type: application/json" \
-d '{"sections":["hosts","cics","datasets"],"hosts":["MF-TEST"],"catalogHosts":{"<catalog id>":["MF-TEST"]},"signWith":"release-key"}'
Export warnings arrive in X-Export-Warning headers; add -D - to print them.
Import
Two calls: upload, then import. Choose the upload id yourself (8 to 100 letters, digits, ., _ or -) so the second call can name it.
UPLOAD_ID="release-$(date +%Y%m%d%H%M%S)"
PACKAGE=coreiq-2026-10-12T15-30-00.crq
# 1. Upload: validates the package and holds it under the id. Changes nothing.
curl --fail -X POST "$COREIQ/api/admin/import-export/upload?uploadId=$UPLOAD_ID" \
-H "x-admin-passkey: $ADMIN_PASSKEY" \
-H "Content-Type: application/octet-stream" \
-H "X-File-Name: $PACKAGE" \
--data-binary "@$PACKAGE"
# Optional dry run: the plan, nothing written
curl --fail -X POST "$COREIQ/api/admin/import-export/check" \
-H "x-admin-passkey: $ADMIN_PASSKEY" \
-H "Content-Type: application/json" \
-d "{\"uploadId\":\"$UPLOAD_ID\"}"
# 2. Import: applies the package in one transaction
curl --fail -X POST "$COREIQ/api/admin/import-export/import" \
-H "x-admin-passkey: $ADMIN_PASSKEY" \
-H "Content-Type: application/json" \
-d "{\"uploadId\":\"$UPLOAD_ID\"}"
The import answers applied, skipped, requiresConfiguration (settings withheld because they look like credentials; enter them on this installation) and warnings.
The import and check bodies accept the dialog's choices:
sections: import only these sections of the package.hostMapping:{"<host in package>": "<host here>"}, where catalog data goes when the package carries it without its host.catalogMapping:{"<catalog in package>": "<catalog here>"}.replacePatterns:truereplaces the common regex patterns with the package's.decisions:{"ref": "<ref from the plan>", "resolution": "..."}per conflict. Resolutions:IMPORT,MERGE(Update),REPLACE,SAVE_NEW(with"newName"),SKIP. Each planned action lists itsrefand acceptedresolutions.
curl --fail -X POST "$COREIQ/api/admin/import-export/import" \
-H "x-admin-passkey: $ADMIN_PASSKEY" \
-H "Content-Type: application/json" \
-d '{
"uploadId": "release-20261012153000",
"sections": ["cics", "datasets"],
"hostMapping": {"MF-TEST": "MF-PROD"},
"decisions": [
{"ref": "<ref from the plan>", "resolution": "MERGE"},
{"ref": "<ref from the plan>", "resolution": "SAVE_NEW", "newName": "CUSTOMERS-V2"}
]
}'
Responses a script should handle
- 400: invalid request or package (unknown section, not a package, a decision that does not fit). Schema failures list
violations. - 409: a conflict has no answer yet and nothing was written. The body is the plan; answer it in
decisionsand post again with the sameuploadId. A 409 withholdermeans another import or export is running. - 410: the upload is no longer held. Uploads live in memory and are dropped after a successful import, on restart, or when eight newer ones are held. Upload again.
- 503 with
Retry-After: another import or export is in progress.
The package format is published as JSON Schema: GET /api/admin/import-export/schema lists the files and GET /api/admin/import-export/schema/<name> returns one.
Copy configuration between installations as signed .crq packages, from the Admin panel or with cURL.