---
title: "Parse JQL query"
method: POST
path: "/rest/api/3/jql/parse"
tags: ["JQL"]
---

# Parse JQL query

`POST /rest/api/3/jql/parse`

Parses and validates JQL queries.

Validation is performed in context of the current user.

This operation can be accessed anonymously.

**[Permissions](#permissions) required:** None.

## Query parameters

- `validation` 'strict' | 'warn' | 'none', required

## Request body

- JqlQueriesToParse — A list of JQL queries to parse.
  - `queries` string[], required — A list of queries to parse.

## Response `200`

Returned if the request is successful.

- ParsedJqlQueries — A list of parsed JQL queries.
  - `queries` ParsedJqlQuery[], required — A list of parsed JQL queries.
    - `errors` string[] — The list of syntax or validation errors.
    - `query` string, required — The JQL query that was parsed and validated.
    - `structure` JqlQuery — A parsed JQL query.
      - `orderBy` JqlQueryOrderByClause — Details of the order-by JQL clause.
        - `fields` JqlQueryOrderByClauseElement[], required — The list of order-by clause fields and their ordering directives.
          - `direction` 'asc' | 'desc' — The direction in which to order the results.
          - `field` JqlQueryField, required — A field used in a JQL query. See [Advanced searching - fields reference](https://confluence.atlassian.com/x/dAiiLQ) for more information about fields in JQL queries.
            - `encodedName` string — The encoded name of the field, which can be used directly in a JQL query.
            - `name` string, required — The name of the field.
            - `property` JqlQueryFieldEntityProperty[] — When the field refers to a value in an entity property, details of the entity property value.
              - …
      - `where` union — A JQL query clause.
        - object — A JQL query clause that consists of nested clauses. For example, `(labels in (urgent, blocker) OR lastCommentedBy = currentUser()). Note that, where nesting is not defined, the parser nests JQL clauses based on the operator precedence. For example, "A OR B AND C" is parsed as "(A OR B) AND C". See Setting the precedence of operators for more information about precedence in JQL queries.`
          - `clauses` JqlQueryClause[], required — The list of nested clauses.
          - `operator` 'and' | 'or' | 'not', required — The operator between the clauses.
        - object — A clause that asserts the current value of a field. For example, `summary ~ test`.
          - `field` JqlQueryField, required — A field used in a JQL query. See [Advanced searching - fields reference](https://confluence.atlassian.com/x/dAiiLQ) for more information about fields in JQL queries.
            - `encodedName` string — The encoded name of the field, which can be used directly in a JQL query.
            - `name` string, required — The name of the field.
            - `property` JqlQueryFieldEntityProperty[] — When the field refers to a value in an entity property, details of the entity property value.
              - …
          - `operand` union, required — Details of an operand in a JQL clause.
            - object — An operand that is a list of values.
              - …
            - object — An operand that is a user-provided value.
              - …
            - object — An operand that is a function. See [Advanced searching - functions reference](https://confluence.atlassian.com/x/dwiiLQ) for more information about JQL functions.
              - …
            - object — An operand that is a JQL keyword. See [Advanced searching - keywords reference](https://confluence.atlassian.com/jiracorecloud/advanced-searching-keywords-reference-765593717.html#Advancedsearching-keywordsreference-EMPTYEMPTY) for more information about operand keywords.
              - …
          - `operator` '=' | '!=' | '>' | '<' | '>=' | '<=' | 'in' | 'not in' | '~' | '~=' | 'is' | 'is not', required — The operator between the field and operand.
        - object — A clause that asserts a previous value of a field. For example, `status WAS "Resolved" BY currentUser() BEFORE "2019/02/02"`. See [WAS](https://confluence.atlassian.com/x/dgiiLQ#Advancedsearching-operatorsreference-WASWAS) for more information about the WAS operator.
          - `field` JqlQueryField, required — A field used in a JQL query. See [Advanced searching - fields reference](https://confluence.atlassian.com/x/dAiiLQ) for more information about fields in JQL queries.
            - `encodedName` string — The encoded name of the field, which can be used directly in a JQL query.
            - `name` string, required — The name of the field.
            - `property` JqlQueryFieldEntityProperty[] — When the field refers to a value in an entity property, details of the entity property value.
              - …
          - `operand` union, required — Details of an operand in a JQL clause.
            - object — An operand that is a list of values.
              - …
            - object — An operand that is a user-provided value.
              - …
            - object — An operand that is a function. See [Advanced searching - functions reference](https://confluence.atlassian.com/x/dwiiLQ) for more information about JQL functions.
              - …
            - object — An operand that is a JQL keyword. See [Advanced searching - keywords reference](https://confluence.atlassian.com/jiracorecloud/advanced-searching-keywords-reference-765593717.html#Advancedsearching-keywordsreference-EMPTYEMPTY) for more information about operand keywords.
              - …
          - `operator` 'was' | 'was in' | 'was not in' | 'was not', required — The operator between the field and operand.
          - `predicates` JqlQueryClauseTimePredicate[], required — The list of time predicates.
            - `operand` union, required — Details of an operand in a JQL clause.
              - …
            - `operator` 'before' | 'after' | 'from' | 'to' | 'on' | 'during' | 'by', required — The operator between the field and the operand.
        - object — A clause that asserts whether a field was changed. For example, `status CHANGED AFTER startOfMonth(-1M)`.See [CHANGED](https://confluence.atlassian.com/x/dgiiLQ#Advancedsearching-operatorsreference-CHANGEDCHANGED) for more information about the CHANGED operator.
          - `field` JqlQueryField, required — A field used in a JQL query. See [Advanced searching - fields reference](https://confluence.atlassian.com/x/dAiiLQ) for more information about fields in JQL queries.
            - `encodedName` string — The encoded name of the field, which can be used directly in a JQL query.
            - `name` string, required — The name of the field.
            - `property` JqlQueryFieldEntityProperty[] — When the field refers to a value in an entity property, details of the entity property value.
              - …
          - `operator` 'changed', required — The operator applied to the field.
          - `predicates` JqlQueryClauseTimePredicate[], required — The list of time predicates.
            - `operand` union, required — Details of an operand in a JQL clause.
              - …
            - `operator` 'before' | 'after' | 'from' | 'to' | 'on' | 'during' | 'by', required — The operator between the field and the operand.
    - `warnings` string[] — The list of warning messages

## Other responses

- `400` — Returned if the request is invalid.
- `401` — Returned if the authentication credentials are incorrect.

---

[API](https://skmtc.net/atlassian/apis/the-jira-cloud-platform-rest-api-2.md) · [All operations](https://skmtc.net/atlassian/apis/the-jira-cloud-platform-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-jira-cloud-platform-rest-api-2/versions/5a51740d7ab3/schema)
