v4

latestOpenAPI 3.0.1Apache 2.02026-08-016169702.3 MB
Jira expressions

Analyse Jira expression

Analyses and validates Jira expressions.

As an experimental feature, this operation can also attempt to type-check the expressions.

Learn more about Jira expressions in the documentation.

Permissions required: None.

post/rest/api/3/expression/analyse

Query parameters

check'syntax' | 'type' | 'complexity'

The check to perform:

  • syntax Each expression's syntax is checked to ensure the expression can be parsed. Also, syntactic limits are validated. For example, the expression's length.
  • type EXPERIMENTAL. Each expression is type checked and the final type of the expression inferred. Any type errors that would result in the expression failure at runtime are reported. For example, accessing properties that don't exist or passing the wrong number of arguments to functions. Also performs the syntax check.
  • complexity EXPERIMENTAL. Determines the formulae for how many expensive operations each expression may execute.

Request body

contextVariablesobject

Context variables and their types. The type checker assumes that common context variables, such as issue or project, are available in context and sets their type. Use this property to override the default types or provide details of new variables.

expressionsstring[] required

The list of Jira expressions to analyse.

Example request

{
  "expressions": [
    "issues.map(issue => issue.properties['property_key'])"
  ]
}

Response

Returned if the request is successful.

Example response

{
  "results": [
    {
      "errors": [
        {
          "message": "!, -, typeof, (, IDENTIFIER, null, true, false, NUMBER, STRING, TEMPLATE_LITERAL, new, [ or { expected, > encountered."
        }
      ]
    }
  ]
}