---
title: "Currently being removed. Evaluate Jira expression"
method: POST
path: "/rest/api/3/expression/eval"
tags: ["Jira expressions"]
deprecated: true
---

# Currently being removed. Evaluate Jira expression

`POST /rest/api/3/expression/eval`

> **Deprecated.**

Endpoint is currently being removed. [More details](https://developer.atlassian.com/changelog/#CHANGE-2046)

Evaluates a Jira expression and returns its value.

This resource can be used to test Jira expressions that you plan to use elsewhere, or to fetch data in a flexible way. Consult the [Jira expressions documentation](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) for more details.

#### Context variables ####

The following context variables are available to Jira expressions evaluated by this resource. Their presence depends on various factors; usually you need to manually request them in the context object sent in the payload, but some of them are added automatically under certain conditions.

 *  `user` ([User](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)): The current user. Always available and equal to `null` if the request is anonymous.
 *  `app` ([App](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#app)): The [Connect app](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) that made the request. Available only for authenticated requests made by Connect Apps (read more here: [Authentication for Connect apps](https://developer.atlassian.com/cloud/jira/platform/security-for-connect-apps/)).
 *  `issue` ([Issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): The current issue. Available only when the issue is provided in the request context object.
 *  `issues` ([List](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#list) of [Issues](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): A collection of issues matching a JQL query. Available only when JQL is provided in the request context object.
 *  `project` ([Project](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#project)): The current project. Available only when the project is provided in the request context object.
 *  `sprint` ([Sprint](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#sprint)): The current sprint. Available only when the sprint is provided in the request context object.
 *  `board` ([Board](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#board)): The current board. Available only when the board is provided in the request context object.
 *  `serviceDesk` ([ServiceDesk](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#servicedesk)): The current service desk. Available only when the service desk is provided in the request context object.
 *  `customerRequest` ([CustomerRequest](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#customerrequest)): The current customer request. Available only when the customer request is provided in the request context object.

Also, custom context variables can be passed in the request with their types. Those variables can be accessed by key in the Jira expression. These variable types are available for use in a custom context:

 *  `user`: A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user) specified as an Atlassian account ID.
 *  `issue`: An [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue) specified by ID or key. All the fields of the issue object are available in the Jira expression.
 *  `json`: A JSON object containing custom content.
 *  `list`: A JSON list of `user`, `issue`, or `json` variable types.

This operation can be accessed anonymously.

**[Permissions](#permissions) required**: None. However, an expression may return different results for different users depending on their permissions. For example, different users may see different comments on the same issue.  
Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`).

## Query parameters

- `expand` string

## Request body

- JiraExpressionEvalRequestBean
  - `context` JiraExpressionEvalContextBean
    - `board` integer — The ID of the board that is available under the `board` variable when evaluating the expression.
    - `custom` CustomContextVariable[] — Custom context variables and their types. These variable types are available for use in a custom context: * `user`: A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user) specified as an Atlassian account ID. * `issue`: An [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue) specified by ID or key. All the fields of the issue object are available in the Jira expression. * `json`: A JSON object containing custom content. * `list`: A JSON list of `user`, `issue`, or `json` variable types.
      - union
        - object — A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user) specified as an Atlassian account ID.
          - `accountId` string, required — The account ID of the user.
          - `type` string, required — Type of custom context variable.
        - object — An [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue) specified by ID or key. All the fields of the issue object are available in the Jira expression.
          - `id` integer — The issue ID.
          - `key` string — The issue key.
          - `type` string, required — Type of custom context variable.
        - object — A JSON object with custom content.
          - `type` string, required — Type of custom context variable.
          - `value` object — A JSON object containing custom content.
    - `customerRequest` integer — The ID of the customer request that is available under the `customerRequest` variable when evaluating the expression. This is the same as the ID of the underlying Jira issue, but the customer request context variable will have a different type.
    - `issue` IdOrKeyBean
      - `id` integer — The ID of the referenced item.
      - `key` string — The key of the referenced item.
    - `issues` JexpIssues — The JQL specifying the issues available in the evaluated Jira expression under the `issues` context variable.
      - `jql` JexpJqlIssues — The JQL specifying the issues available in the evaluated Jira expression under the `issues` context variable. Not all issues returned by the JQL query are loaded, only those described by the `startAt` and `maxResults` properties. To determine whether it is necessary to iterate to ensure all the issues returned by the JQL query are evaluated, inspect `meta.issues.jql.count` in the response.
        - `maxResults` integer — The maximum number of issues to return from the JQL query. Inspect `meta.issues.jql.maxResults` in the response to ensure the maximum value has not been exceeded.
        - `query` string — The JQL query.
        - `startAt` integer — The index of the first issue to return from the JQL query.
        - `validation` 'strict' | 'warn' | 'none' — Determines how to validate the JQL query and treat the validation results.
    - `project` IdOrKeyBean
      - `id` integer — The ID of the referenced item.
      - `key` string — The key of the referenced item.
    - `serviceDesk` integer — The ID of the service desk that is available under the `serviceDesk` variable when evaluating the expression.
    - `sprint` integer — The ID of the sprint that is available under the `sprint` variable when evaluating the expression.
  - `expression` string, required — The Jira expression to evaluate.

## Response `200`

Returned if the evaluation results in a value. The result is a JSON primitive value, list, or object.

- JiraExpressionResult — The result of evaluating a Jira expression.
  - `meta` JiraExpressionEvaluationMetaDataBean
    - `complexity` JiraExpressionsComplexityBean
      - `beans` JiraExpressionsComplexityValueBean, required
        - `limit` integer, required — The maximum allowed complexity. The evaluation will fail if this value is exceeded.
        - `value` integer, required — The complexity value of the current expression.
      - `expensiveOperations` JiraExpressionsComplexityValueBean, required
        - `limit` integer, required — The maximum allowed complexity. The evaluation will fail if this value is exceeded.
        - `value` integer, required — The complexity value of the current expression.
      - `primitiveValues` JiraExpressionsComplexityValueBean, required
        - `limit` integer, required — The maximum allowed complexity. The evaluation will fail if this value is exceeded.
        - `value` integer, required — The complexity value of the current expression.
      - `steps` JiraExpressionsComplexityValueBean, required
        - `limit` integer, required — The maximum allowed complexity. The evaluation will fail if this value is exceeded.
        - `value` integer, required — The complexity value of the current expression.
    - `issues` IssuesMetaBean — Meta data describing the `issues` context variable.
      - `jql` IssuesJqlMetaDataBean — The description of the page of issues loaded by the provided JQL query.
        - `count` integer, required — The number of issues that were loaded in this evaluation.
        - `maxResults` integer, required — The maximum number of issues that could be loaded in this evaluation.
        - `startAt` integer, required — The index of the first issue.
        - `totalCount` integer, required — The total number of issues the JQL returned.
        - `validationWarnings` string[] — Any warnings related to the JQL query. Present only if the validation mode was set to `warn`.
  - `value` unknown, required

## Other responses

- `400` — Returned if: * the request is invalid, that is: * invalid data is provided, such as a request including issue ID and key. * the expression is invalid and can not be parsed. * evaluation fails at runtime. This may happen for various reasons. For example, accessing a property on a null object (such as the expression `issue.id` where `issue` is `null`). In this case an error message is provided.
- `401` — Returned if the authentication credentials are incorrect or missing.
- `404` — Returned if any object provided in the request context is not found or the user does not have permission to view it.

---

[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/ec7f275dfee5/schema)
