Parse Jql Query

POST {{baseUrl}}/rest/api/3/jql/parse?validation=strict

Parses and validates JQL queries.

Validation is performed in context of the current user.

This operation can be accessed anonymously.

Permissions required: None.

Request Params

KeyDatatypeRequiredDescription
validationstringHow to validate the JQL query and treat the validation results. Validation options include:
  • strict Returns all errors. If validation fails, the query structure is not returned.
  • warn Returns all errors. If validation fails but the JQL query is correctly formed, the query structure is returned.
  • none No validation is performed. If JQL query is correctly formed, the query structure is returned. |

Request Body

{"queries"=>["<string>", "<string>"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;queries&quot;:[{&quot;query&quot;:&quot;summary ~ test AND (labels in (urgent, blocker) OR lastCommentedBy = currentUser()) AND status CHANGED AFTER -5d ORDER BY updated DESC&quot;,&quot;structure&quot;:{&quot;where&quot;:{&quot;clauses&quot;:[{&quot;field&quot;:{&quot;name&quot;:&quot;summary&quot;},&quot;operator&quot;:&quot;~&quot;,&quot;operand&quot;:{&quot;value&quot;:&quot;test&quot;}},{&quot;clauses&quot;:[{&quot;field&quot;:{&quot;name&quot;:&quot;labels&quot;},&quot;operator&quot;:&quot;in&quot;,&quot;operand&quot;:{&quot;values&quot;:[{&quot;value&quot;:&quot;urgent&quot;},{&quot;value&quot;:&quot;blocker&quot;}]}},{&quot;field&quot;:{&quot;name&quot;:&quot;lastCommentedBy&quot;,&quot;property&quot;:[{&quot;entity&quot;:&quot;issue&quot;,&quot;key&quot;:&quot;propertyKey&quot;,&quot;path&quot;:&quot;path.in.property&quot;,&quot;type&quot;:&quot;user&quot;}]},&quot;operator&quot;:&quot;=&quot;,&quot;operand&quot;:{&quot;function&quot;:&quot;currentUser&quot;,&quot;arguments&quot;:[]}}],&quot;operator&quot;:&quot;or&quot;},{&quot;field&quot;:{&quot;name&quot;:&quot;status&quot;},&quot;operator&quot;:&quot;changed&quot;,&quot;predicates&quot;:[{&quot;operator&quot;:&quot;after&quot;,&quot;operand&quot;:{&quot;function&quot;:&quot;startOfMonth&quot;,&quot;arguments&quot;:[&quot;-1M&quot;]}}]}],&quot;operator&quot;:&quot;and&quot;},&quot;orderBy&quot;:{&quot;fields&quot;:[{&quot;field&quot;:{&quot;name&quot;:&quot;updated&quot;},&quot;direction&quot;:&quot;desc&quot;}]}}},{&quot;query&quot;:&quot;invalid query&quot;,&quot;errors&quot;:[&quot;Error in the JQL Query: Expecting operator but got &#39;query&#39;. The valid operators are &#39;=&#39;, &#39;!=&#39;, &#39;\u003c&#39;, &#39;\u003e&#39;, &#39;\u003c=&#39;, &#39;\u003e=&#39;, &#39;~&#39;, &#39;!~&#39;, &#39;IN&#39;, &#39;NOT IN&#39;, &#39;IS&#39; and &#39;IS NOT&#39;. (line 1, character 9)&quot;]},{&quot;query&quot;:&quot;summary = test&quot;,&quot;errors&quot;:[&quot;The operator &#39;=&#39; is not supported by the &#39;summary&#39; field.&quot;]},{&quot;query&quot;:&quot;summary in test&quot;,&quot;errors&quot;:[&quot;Operator &#39;in&#39; does not support the non-list value &#39;\&quot;test\&quot;&#39; for field &#39;summary&#39;.&quot;]},{&quot;query&quot;:&quot;project = INVALID&quot;,&quot;errors&quot;:[&quot;The value &#39;INVALID&#39; does not exist for the field &#39;project&#39;.&quot;]},{&quot;query&quot;:&quot;universe = 42&quot;,&quot;errors&quot;:[&quot;Field &#39;universe&#39; does not exist or you do not have permission to view it.&quot;]}]}