Public beta — not for production use. Data may be wiped at any time. Questions? Contact us.
Documentation menu

axiom instance preview

Preview the exact output a mapping produces, including not-yet-real (drafted) messages

View as Markdown
<!-- GENERATED by docs/scripts/gen-cli-reference — DO NOT EDIT. Source of truth: the cobra command definitions in cmd/axiom/cmd/. Regenerate from the repo root with: go run ./docs/scripts/gen-cli-reference -->

axiom instance preview

Preview the exact output a mapping produces, including not-yet-real (drafted) messages

Preview an /adapters/preview mapping against sample source value(s), without a live invoke — wraps POST /adapters/preview verbatim. Runs the SAME mapping engine (PrepareAdapter/ExecuteAdapter, CEL, transforms) the registry compiler and worker use at real dispatch time.

The request body is read from --request-file (or stdin) and forwarded unmodified. It must match the registry's adapterPreviewRequest shape:

{
  "dst_msg_name": "OrderSummary",
  "sources": [
    {"edge_id": "e1", "msg_name": "Order", "sample": {"id": 1}}
  ],
  "adapter": {"total": "$.amount"}
}

Any "msg_name" (dst_msg_name or a sources[] entry) may be a bare registry message name (a JSON string, as above) OR an inline, not-yet-real draft — the IDENTICAL {"message_name": ..., "fields": {...}} shape "axiom instance create"'s --output-fields-file/--input-fields-file use — in place of the string, letting you preview a mapping against a message you haven't created yet:

{"dst_msg_name": {"message_name": "OrderSummary", "fields": {"total": "double"}}, ...}

Exactly one of "adapter" (single-edge DSL) or "compose_mapping" (edge_adapters + compose_plan, for a multi-source compose consumer) is required.

axiom instance preview --request-file ./preview-request.json
axiom instance preview --json   # machine-readable output, reads stdin

Requires a prior "axiom login".

Usage

axiom instance preview [flags]

Flags

FlagShorthandTypeDefaultDescription
--help-hboolhelp for preview
--jsonboolEmit a single JSON result object
--request-filestringPath to a JSON /adapters/preview request body (defaults to stdin)

See also

  • axiom instance — Create Instances from a Generic node (type-bind, no build, no deploy)