Skip to content

Definition export and import: codes not ids, UI only

Accepted. Built in both the /ui console and the SPA.

2026-10-29.

Definitions that are made by hand rather than by an SDK sync, such as a connection, a dispatch pool, a subscription, an application or a service account, often need to be recreated in another environment: quality assurance to production. Re-typing them is slow and error-prone. Ids differ per environment, so a raw database or API copy is wrong, and a definition can reference credentials that must never travel.

A bulk import API would solve it but would also be a new write path, with its own authorisation, validation and conflict behaviour to get right and keep safe.

Export and import are a user-interface convenience only.

  • No writes and no new endpoint. Export reads what the detail drawer already shows. Import only fills in the create form. Nothing is saved until the person presses Create, and the normal create checks apply: permissions, validation and the duplicate-code error.
  • Codes, not ids. Every reference is written as a code (or client identifier) and matched against the destination environment’s records on import.
  • No secrets, no ids. Credentials, ids, status, timestamps and creators are never exported.
  • Never skip silently. Anything an import cannot apply is listed: references with no match here (so the person can create them first), values the create form cannot take (such as a service account’s roles, to assign after creating), and unknown keys.
  • One format for both consoles. A file is an envelope with a fixed marker, a kind, a version and a definition, with keys in a fixed order and unset keys omitted. A file exported from one console imports into the other. The checked-in examples are the contract, and both consoles’ tests read them.
  • Five kinds: application, service account, connection, dispatch pool and subscription. Event types are excluded because they come from SDK sync.
  • If a viewer cannot read a referenced record, its key is omitted and the export says why. An id is never written in its place.

Good:

  • A copy is a reviewed human action using the existing, already-authorised create path.
  • Nothing sensitive is in the file, so it can be shared and kept in a ticket.
  • No new API surface to secure, document or keep compatible.

Bad:

  • It is one record at a time. There is no bulk or scripted promotion.
  • Dependencies must be created first, in the right order, by hand.
  • Import is not idempotent: an existing code fails on create as usual.
  • The format is duplicated in two consoles and kept in step by shared example files.
Alternative Why not
A bulk import API A second write path with its own authorisation and conflict rules.
Export ids and secrets for exact copies Ids are meaningless elsewhere and secrets must not travel in files.
Infrastructure-as-code for definitions Appropriate for application-owned definitions, which the SDK sync already covers; this is for hand-made ones.