Search the Live Tenant
ajat search queries the configured Jira tenant through the Automation API and
returns matching rule summaries. Use it when you want a fresh answer — “which
rules are currently DISABLED?” — without first running a full
ajat export.
It is intentionally a thin command. It returns only the UUID, name, and scope of
each matching rule. The richer matching needed for bulk operations lives on the
local export catalog and is available through the ajat rule
command family.
ajat works with Atlassian Jira Cloud Automation only. It does not
support Jira Server or Jira Data Center. ajat search calls the live Jira
Cloud tenant, so it requires valid credentials and a working configuration —
run ajat doctor first if you are unsure.
Usage
ajat search [--trigger <type>] [--state ENABLED|DISABLED] \
[--author <accountId>] [--scope <ari>]... \
[--limit <n>] [--page-size <n>] \
[--format table|json]All filters are optional and are ANDed together server-side. Passing no filters lists every rule in the tenant.
Flags
| Flag | Default | Description |
|---|---|---|
--trigger | (none) | Filter by the rule’s trigger component type (e.g. jira.issue.created). |
--state | (none) | Filter by rule state: ENABLED or DISABLED. |
--author | (none) | Filter by actor.accountId. |
--scope | [] | Filter by ruleScopeARI. Repeatable — any rule carrying any listed ARI matches. |
--limit | 0 | Stop after returning at most this many matches. 0 means no cap. |
--page-size | 100 | Cursor page size for the underlying API loop (1–100). |
--format | table | Output format: table or json. |
Examples
# Every ENABLED rule whose trigger is issue.created
ajat search --state ENABLED --trigger jira.issue.created
# Every DISABLED rule, capped to the first 10 (spot-check)
ajat search --state DISABLED --limit 10
# Rules authored by a specific account, as JSON for scripting
ajat search --author 5b1...:abc --format json
# All rules carrying either of two scope ARIs
ajat search --scope ari:cloud:jira::site/AAA --scope ari:cloud:jira::site/BBBOutput formats
Table (default)
A summary header echoes the active filter, followed by a UUID / Name / Scope
table:
Search
state : ENABLED
trigger : jira.issue.created
matches : 17
UUID Name Scope
──────────────────────────────────── ──────────────────────── ──────────
11111111-… Auto-triage incoming global
...JSON
A single self-describing object containing the filter echo plus the matched
summaries — ideal for piping to jq:
ajat search --state DISABLED --format json | jq '.matches | length'{
"filter": {
"state": "DISABLED"
},
"matches": [
{
"uuid": "11111111-…",
"name": "Auto-triage incoming",
"ruleScopeARIs": [],
"updated": 1772715265.948
}
]
}Because the JSON stays self-describing, scripted follow-up is straightforward:
# Collect the UUIDs of every rule authored by one account
ajat search --author 5b1...:abc --format json | jq -r '.matches[].uuid'When to use search vs. export + reports
ajat search hits the live API and returns summaries; ajat export writes a
full local snapshot that reports and
ajat rule selectors consume. Reach for each one as
follows.
Use ajat search when:
- You do not have a recent export on disk and only need to inspect, not mutate.
- You want to verify a recent change without re-exporting.
- You only care about UUID, name, and scope — the summary endpoint does not echo labels, condition counts, or component schemas.
Use ajat export plus reports when:
- You need the full rule bodies — triggers, conditions, actions, branches, labels, and integration targets.
- You want offline, shareable analysis (inventory, collision, consistency, risk, workflow) with no live Jira dependency.
- You are preparing for bulk operations, drift review, restore, or an audit.
For bulk mutation — enable, disable, delete, or scope updates — keep using the
ajat rule commands against a local export. Selectors
across label, name pattern, and component count have no API-side equivalent, so
ajat search cannot drive them.
Exit codes
| Code | Meaning |
|---|---|
0 | Search completed (even with zero matches). |
1 | Bootstrap or configuration failure. |
130 | Interrupted by SIGINT / SIGTERM. |
Related
ajat export— full snapshot to disk; what reports and bulk-rule commands consume.ajat rule— bulk mutations selected from the local catalog.- Reports — five self-contained HTML reports over an export snapshot.
- Utilities —
doctorand the rest of the diagnostic surface.