Developer
News and Updates
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Last updated Apr 1, 2026

Output format

All commands return a consistent JSON envelope when you use -o json:

1
2
{
  "command": "jira workitem query",
  "request": { "site": "example", "jql": "..." },
  "data": {
    "edges": [
      {
        "node": {
          "key": "PROJ-123",
          "summary": "Fix login bug",
          "status": { "name": "In Progress" },
          "webUrl": "https://example.atlassian.net/browse/PROJ-123"
        }
      }
    ]
  }
}

Read the response

  • Lists — access items via data.edges[].node
  • Single items — access the result directly via data
  • Fields are flat — use .summary, .status.name, .webUrl, not .fields.summary

Process JSON output

1
2
# Pipe to jq
twg jira workitem query --jql "project = PROJ" -o json | \
  jq '.data.edges[].node | {key, summary, status: .status.name}'

# Write large results to a file
twg work query --scope me --since 30d --output-file /tmp/work.json

Use agent mode

When called by an agent, append --mode agent. This produces quieter output and strips the hints and warnings keys from the JSON envelope so the agent receives a smaller, cleaner payload:

1
2
twg work query --scope me --since 7d --mode agent

The standard envelope includes:

1
2
{
  "command": "...",
  "request": { ... },
  "data": { ... },
  "hints": ["..."],
  "warnings": ["..."]
}

With --mode agent, hints and warnings are omitted:

1
2
{
  "command": "...",
  "request": { ... },
  "data": { ... }
}

For large result sets, pair --mode agent with --output-file to write JSON to a file and avoid stdout size limits. The CLI prints stdout=<path> to stdout so the agent knows where to read the result:

1
2
twg work query --scope me --since 30d --mode agent --output-file /tmp/work.json
# stdout: stdout=/tmp/work.json

Next steps

Rate this page: