Invoke Manual Rules
ajat invoke runs a manually-triggered Jira Cloud Automation rule against one or more target objects, the same way the “Trigger rule” button does in the Jira UI. Manual rules are fired on demand against specific issues or alerts rather than scheduled, and this command lets you fire them from a script or CI pipeline via POST /rest/v1/rule/manual/{ruleId}/invocation.
ajat invoke runs the rule against your live Jira Cloud
tenant. It is plan-first: the plan (resolved rule UUID, target list,
and inputs) is printed and you are prompted before the rule fires. Use
—dry-run to preview and exit; use —yes to skip the
prompt in automation (required when stdin is not a TTY).
ajat targets Atlassian Jira Cloud Automation only. It does not support Jira Server or Jira Data Center.
Usage
ajat invoke <rule-uuid> \
--target <PROJ-KEY|issue-key|ARI> [--target ...]... \
[--from-file <path>] \
[--input KEY=VALUE]... \
[--inputs-file <path>] \
[--dry-run] [--yes] [--format table|json]Identify the rule by its UUID. Use ajat rule manual list to discover the manual rules that apply to a target and their UUIDs.
Flags
| Flag | Default | Description |
|---|---|---|
--target <key|ari> | [] | Target object as an ARI or Jira issue key. Repeatable. |
--from-file <path> | (none) | File with one target per line (blank lines and # comments ignored). |
--input KEY=VALUE | [] | User input, sent with inputType=TEXT. Repeatable. |
--inputs-file <path> | (none) | JSON file with the userInputs map. Overrides --input. |
--dry-run | false | Print the plan and exit without invoking the rule. |
--yes | false | Skip the interactive confirmation prompt. |
--format table|json | table | Output format. |
Targets
--target accepts two equivalent forms. Inputs are detected by prefix: anything starting with ari: is treated as an ARI; anything else is treated as an issue key.
| Form | Example | What happens |
|---|---|---|
| ARI | ari:cloud:jira:<cloudId>:issue/10042 | Passed through to the API verbatim. Also works for non-issue ARIs such as alerts. |
| Issue key | PROJ-123 | Resolved into the canonical issue ARI via GET /rest/api/3/issue/{key} before invocation. The resolution is shown in the printed plan. |
A typo on an ARI will be tried as an issue key and fail with the offending input named in the error — re-run with the corrected target. Both forms can be mixed within a single command, and the input order is preserved in the plan and output.
For bulk runs, write one target per line to a file and pass --from-file. Blank lines and # comments are ignored:
# targets.txt
PROJ-123
PROJ-124
ari:cloud:jira:<tenant>:alert/abcajat invoke 11111111-2222-3333-4444-555555555555 --from-file ./targets.txt --yesUser inputs
A manual rule in Jira can declare typed inputs — the prompts the user sees in the UI dialog. ajat invoke supplies them two ways.
--input KEY=VALUE (convenience, TEXT only)
Every value is sent as {"inputType": "TEXT", "value": "<string>"}, which covers the common case:
ajat invoke 11111111-2222-3333-4444-555555555555 \
--target ari:cloud:jira:<tenant>:issue/10042 \
--input reason="re-triage" --yes--inputs-file <path> (full typing)
Write the userInputs object as JSON and pass it through verbatim. Use this when the rule declares NUMBER, BOOLEAN, or other non-text inputs:
{
"priority": { "inputType": "NUMBER", "value": 1 },
"escalate": { "inputType": "BOOLEAN", "value": true }
}ajat invoke 11111111-2222-3333-4444-555555555555 \
--target ari:cloud:jira:<tenant>:issue/10042 \
--inputs-file ./inputs.json --yes—inputs-file overrides —input when both are
supplied: the file is the explicit-typing escape hatch, so an operator who
bothered to write it almost certainly meant it to win.
Safety model
- The plan is always printed first: resolved rule UUID, target list, and resolved inputs.
--dry-runexits before any API call.--yesis required when stdin is not a TTY.- Per-target results from the API are surfaced in the output. If any target returns a status other than
SUCCESS, the command exits with code2.
Examples
# Preview an invocation against a single issue.
ajat invoke 11111111-2222-3333-4444-555555555555 \
--target ari:cloud:jira:<tenant>:issue/1001 --dry-run
# Fire the rule against that issue.
ajat invoke 11111111-2222-3333-4444-555555555555 \
--target ari:cloud:jira:<tenant>:issue/1001 --yes
# Bulk run from a target file.
ajat invoke 11111111-2222-3333-4444-555555555555 \
--from-file ./targets.txt --yesOutput
Table (default)
Invocation results
TARGET STATUS
ari:cloud:jira:<tenant>:issue/1001 SUCCESS
ari:cloud:jira:<tenant>:issue/1002 INVALID_TARGET_OBJECTJSON
ajat invoke 11111111-2222-3333-4444-555555555555 \
--target ari:cloud:jira:<tenant>:issue/1001 --yes --format json{
"rule_id": "11111111-2222-3333-4444-555555555555",
"results": {
"ari:cloud:jira:<tenant>:issue/1001": "SUCCESS",
"ari:cloud:jira:<tenant>:issue/1002": "INVALID_TARGET_OBJECT"
}
}Exit codes
| Code | Meaning |
|---|---|
0 | Every target returned SUCCESS. |
1 | Bootstrap / configuration / argument failure. |
2 | At least one target returned a non-SUCCESS status. |
130 | Interrupted by SIGINT / SIGTERM. |
Discovering manual rules
To find the UUID of a manual rule, use ajat rule manual list:
ajat rule manual list --target PROJ-123
ajat rule manual list --from-file ./targets.txt --format jsonRelated
- Bulk Rule Operations —
rule manual listdiscovers manual rules; therulegroup also disables, enables, deletes, and rescopes rules in bulk. - Export — a full snapshot captures manual rules too.