opschain triggers
triggers
Manage event-automation triggers: per-project rules that create changes or
workflow runs from events. A trigger has a match half — subject, events,
scope and conditions — and an action half — action type, action params and a
per-minute throttle. The API addresses triggers by row id, but the CLI
addresses them as <project>/<code>: a trigger's code is unique within its
project. Every verb here needs a server target (--server <url>,
OPSCHAIN_SERVER, or the active context).
Each time a trigger matches an event, the outcome is recorded as a
firing that settles created (a change or workflow run was made),
suppressed (matched but intentionally not acted on, e.g. throttled or
discarded) or failed — or sits deferred while a maintenance window
parks it. triggers firings lists them; triggers test dry-runs a trigger
against a stored event without firing anything.
| Subcommand | Purpose |
|---|---|
opschain docs cli/triggers-list | List a project's triggers. |
opschain docs cli/triggers-show | One trigger's full definition and newest firings. |
opschain docs cli/triggers-create | Create a trigger from a flat YAML attribute file. |
opschain docs cli/triggers-update | Update parts of a trigger (code is immutable). |
opschain docs cli/triggers-enable / opschain docs cli/triggers-disable | Flip a trigger's enabled flag. |
opschain docs cli/triggers-delete | Delete a trigger and its firings. |
opschain docs cli/triggers-firings | List a trigger's firings, filterable by status and age. |
opschain docs cli/triggers-discard | Discard one deferred firing before its window releases. |
opschain docs cli/triggers-test | Dry-run a trigger against a stored event, gate by gate. |
opschain docs cli/triggers-export | Export a trigger as its nested when/then interchange YAML. |
opschain docs cli/triggers-import | Import an interchange document through the ordinary create/update path. |
Two YAML formats exist on purpose: triggers create and triggers update
load a flat attribute file that mirrors the API's writable attributes
verbatim, while triggers export and triggers import speak the nested
when/then interchange document for backup and change control. Each loader
rejects the other's format by name.
See also
opschain docs cli/events— the events triggers match.opschain learn 5.2(triggers),opschain learn 5.4(custom events),opschain learn 5.6(maintenance windows) andopschain learn 8.1(backup and interchange).