diagrid workflow archive export
Export terminal workflow executions as signed archives
Description
Export a terminal workflow execution as a signed archive document, without purging it. The execution's state is read from the control plane and assembled into the same archive format produced on purge, so it can be verified with "diagrid workflow archive verify".
Only terminal executions (completed, failed, terminated) can be exported.
Use --bulk to export every terminal execution that matches the given filters (status, name, id and start/end time) instead of a single execution. Each archive is written to the --out-dir directory as "<id>-<instance-id>.json".
Pass --verify to cryptographically verify the archive before it is written. The signature chain is checked against the project's region trust anchor (fetched from the control plane) and the signing identity is asserted against the id. If verification fails — an invalid or unsigned archive — nothing is written and the command exits non-zero.
diagrid workflow archive export [workflow-id] [flags]
Examples
# Export a single execution to stdout
diagrid workflow archive export wf-123 -p my-project -a my-app
# Save it to a file, then verify it
diagrid workflow archive export wf-123 -p my-project -a my-app --out wf-123.json
diagrid workflow archive verify wf-123.json -p my-project
# Export only if the archive verifies against the region trust anchor
diagrid workflow archive export wf-123 -p my-project -a my-app --verify --out wf-123.json
# Bulk export all failed executions of an id to a directory
diagrid workflow archive export --bulk -p my-project -a my-app --status failed --out-dir ./archives
# Bulk export executions of given workflow names that ended before a time
diagrid workflow archive export --bulk -p my-project --name OrderWorkflow,ShippingWorkflow --end-before "2026-05-20T19:30:00+02:00" --out-dir ./archives
Options
-p, --project string Name of existing project
-a, --id string id that owns the workflow. Required unless --bulk is set, where it filters the executions to export.
--out string Write the archive to this file instead of stdout
--verify Verify the archive's signatures against the region trust anchor before writing; fail if invalid or unsigned
--bulk Export every terminal execution matching the given filters instead of a single execution.
--out-dir string Directory to write archives to, one file per execution named "<id>-<instance-id>.json". Required with --bulk.
-s, --status strings Filter executions to export by status. Can be repeated to pass multiple values.
Valid values:completed, failed, terminated
-n, --name strings Filter executions to export by workflow name. Can be repeated to pass multiple values.
--start-after time Return workflows that started after the given time in RFC3339 format (e.g 2006-01-02T15:04:05Z07:00))
--start-before time Return workflows that started before the given time in RFC3339 format (e.g 2006-01-02T15:04:05Z07:00))
--end-after time Return workflows that ended after the given time in RFC3339 format (e.g 2006-01-02T15:04:05Z07:00))
--end-before time Return workflows that ended before the given time in RFC3339 format (e.g 2006-01-02T15:04:05Z07:00))
-h, --help help for export
Options inherited from parent commands
--api-key string Diagrid Cloud API key
SEE ALSO
- diagrid workflow archive - Work with workflow history archives