eval
is that this endpoint uses the enhanced search API when evaluating JQL queries. This API is eventually consistent, unlike the strongly consistent eval
API. This allows for better performance and scalability. In addition, this API's response for JQL evaluation is based on a scrolling view (backed by a nextPageToken
) instead of a paginated view (backed by startAt
and totalCount
).user
(User): The current user. Always available and equal to null
if the request is anonymous.app
(App): The Connect app that made the request. Available only for authenticated requests made by Connect apps (read more here: Authentication for Connect apps).issue
(Issue): The current issue. Available only when the issue is provided in the request context object.project
(Project): The current project. Available only when the project is provided in the request context object.sprint
(Sprint): The current sprint. Available only when the sprint is provided in the request context object.board
(Board): The current board. Available only when the board is provided in the request context object.serviceDesk
(ServiceDesk): The current service desk. Available only when the service desk is provided in the request context object.customerRequest
(CustomerRequest): The current customer request. Available only when the customer request is provided in the request context object.user
: A user specified as an Atlassian account ID.issue
: An 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.board
and sprint
) or fields (for example, issue.sprint
).curl --location --request POST '/rest/api/3/expression/evaluate' \
--header 'Content-Type: application/json' \
--data-raw '{
"context": {
"board": 10100,
"custom": {
"config": {
"type": "json",
"value": {
"userId": "10002"
}
},
"issuesList": [
{
"key": "ACJIRA-1471",
"type": "issue"
},
{
"id": 100001,
"type": "issue"
}
],
"myUser": {
"accountId": "100001",
"type": "user"
},
"nullField": {
"type": "json"
}
},
"customerRequest": 1450,
"issue": {
"key": "ACJIRA-1470"
},
"issues": {
"jql": {
"maxResults": 100,
"nextPageToken": "EgQIlMIC",
"query": "project = HSP"
}
},
"project": {
"key": "ACJIRA"
},
"serviceDesk": 10023,
"sprint": 10001
},
"expression": "{ key: issue.key, type: issue.issueType.name, links: issue.links.map(link => link.linkedIssue.id), listCustomVariable: issuesList.includes(issue), customVariables: myUser.accountId == config.userId}"
}'
{"value":"The expression's result. This value can be any JSON, not necessarily a String","meta":{"complexity":{"steps":{"value":1,"limit":10000},"expensiveOperations":{"value":3,"limit":10},"beans":{"value":0,"limit":1000},"primitiveValues":{"value":1,"limit":10000}},"issues":{"jql":{"nextPageToken":"EgQIlMIC","isLast":false}}}}