Skip to content

jira jql validate

  • Usage: jira jql validate QUERY... [flags]

Send one or more JQL strings to Jira's parser and report per-query errors and warnings. Use it before saving a query or handing generated JQL to another command.

A JQL parse failure is returned as data with valid: false; it is not treated as a CLI input error. Transport, authentication, rate limit, and server failures still return non-zero command errors.

Validation

--mode <MODE>

Validation strictness

Allowed values:

  • strict — strictest (default)
  • warn — lenient
  • none — no validation

Output fields

With --output json, the response envelope's data object carries these fields. Run jira agent schema for the full machine-readable schema.

Field Type Description
queries[].errors[] string
queries[].query string
queries[].valid boolean
queries[].warnings[] string

Examples

jira jql validate "status = Done AND assignee = currentUser()"
jira jql validate "project = PROJ" "created >= -7d" --mode warn # (1)!
jira jql validate "project = PROJ AND status = Done" --output=json # (2)!
  1. Use Jira's lenient warning mode
  2. Return per-query validity in JSON