Config as Code

Config as Code

AlertMagic and ConnectMagic configurations can be exported to, and imported from, a single JSON document using the Magic Suite CLI. This lets you version-control, review, diff, clone between tenants, and deploy these configurations from CI - the same lifecycle every other asset gets.

AlertMagic (EventManager versions)

Export or import a complete EventManager version - calculations, incident specs, mappings, comment specs, problem specs, snippets and deduplication mappings - as one document.

  • magicsuite api export eventmanager <eventManagerId> --output integration.jsonc (omit --version-id to export the published version)
  • magicsuite api import eventmanager <eventManagerId> --file integration.jsonc (imported as a new version of that EventManager)

ConnectMagic (Sync versions)

Export or import a whole Sync configuration - connected systems, datasets, mappings, constants, state datasets and routing rules - using the same { "Configuration": { ... } } artefact the import wizard consumes.

  • magicsuite api export sync <syncId> --output sync.jsonc
  • magicsuite api import sync --file sync.jsonc (the Sync is created, or a new version is added to the existing Sync with the same name in the document)

Add --connection-map "System Name=<connection id or name>" (repeatable) to point a connected system at a specific connection, or --no-activate to import the version without making it active.

Connections across environments

Exports record each connection by id and name. On import the connection is resolved by id first, then by name, so a configuration exported from one environment (for example alpha) imports cleanly into another (for example production) where the connection ids differ.

Managing individual entities

Every entity - including nested child entities - can also be managed individually with the generic api commands: magicsuite api get, api get-by-id, api create, api patch and api delete.

Paging: --take / --skip require --orderby

When listing entities with paging you must specify an order. If you pass --take or --skip to api get (equivalently $top or $skip on the REST API), you must also supply --orderby ($orderby); otherwise the request is rejected. Ordering guarantees stable, repeatable paging.

Reconnection

Reconnection

Reconnection

timed out

timed out

Attempt of

Reload
An unhandled error has occurred. Reload 🗙