JIRA 7.6.1
  1. Jira expressions
JIRA 7.6.1
  • Announcement banner
    • Get announcement banner configuration
      GET
    • Update announcement banner configuration
      PUT
  • Issue custom field values (apps)
    • Update custom fields
      POST
    • Update custom field value
      PUT
  • Issue custom field configuration (apps)
    • Get custom field configurations
      GET
    • Update custom field configurations
      PUT
  • Jira settings
    • Get application property
      GET
    • Get advanced settings
      GET
    • Set application property
      PUT
    • Get global settings
      GET
  • Application roles
    • Get all application roles
      GET
    • Get application role
      GET
  • Issue attachments
    • Get attachment content
      GET
    • Get Jira attachment settings
      GET
    • Get attachment thumbnail
      GET
    • Get attachment metadata
      GET
    • Delete attachment
      DELETE
    • Get all metadata for an expanded attachment
      GET
    • Get contents metadata for an expanded attachment
      GET
    • Add attachment
      POST
  • Audit records
    • Get audit records
      GET
  • Avatars
    • Get system avatars by type
    • Get avatars
    • Load avatar
    • Delete avatar
    • Get avatar image by type
    • Get avatar image by ID
    • Get avatar image by owner
  • Issue comments
    • Get comments by IDs
    • Get comments
    • Add comment
    • Get comment
    • Update comment
    • Delete comment
  • Issue comment properties
    • Get comment property keys
    • Get comment property
    • Set comment property
    • Delete comment property
  • Project components
    • Create component
    • Get component
    • Update component
    • Delete component
    • Get component issues count
    • Get project components paginated
    • Get project components
  • Time tracking
    • Get selected time tracking provider
    • Select time tracking provider
    • Get all time tracking providers
    • Get time tracking settings
    • Set time tracking settings
  • Issue custom field options
    • Get custom field option
    • Get custom field options (context)
    • Update custom field options (context)
    • Create custom field options (context)
    • Reorder custom field options (context)
    • Delete custom field options (context)
  • Dashboards
    • Get all dashboards
    • Create dashboard
    • Get available gadgets
    • Search for dashboards
    • Get gadgets
    • Add gadget to dashboard
    • Update gadget on dashboard
    • Remove gadget from dashboard
    • Get dashboard item property keys
    • Get dashboard item property
    • Set dashboard item property
    • Delete dashboard item property
    • Get dashboard
    • Update dashboard
    • Delete dashboard
    • Copy dashboard
  • Issues
    • Get events
    • Create issue
    • Bulk create issue
    • Get create issue metadata
    • Get issue
    • Edit issue
    • Delete issue
    • Assign issue
    • Get changelogs
    • Get changelogs by IDs
    • Get edit issue metadata
    • Send notification for issue
    • Get transitions
    • Transition issue
  • Jira expressions
    • Analyse Jira expression
      POST
    • Evaluate Jira expression
      POST
  • Issue fields
    • Get fields
    • Create custom field
    • Get fields paginated
    • Get fields in trash paginated
    • Update custom field
    • Get contexts for a field
    • Delete custom field
    • Restore custom field from trash
    • Move custom field to trash
  • Issue custom field contexts
    • Get custom field contexts
    • Create custom field context
    • Get custom field contexts default values
    • Set custom field contexts default values
    • Get issue types for custom field context
    • Get custom field contexts for projects and issue types
    • Get project mappings for custom field context
    • Update custom field context
    • Delete custom field context
    • Add issue types to context
    • Remove issue types from context
    • Assign custom field context to projects
    • Remove custom field context from projects
  • Screens
    • Get screens for a field
    • Get screens
    • Create screen
    • Add field to default screen
    • Update screen
    • Delete screen
    • Get available screen fields
  • Issue custom field options (apps)
    • Get all issue field options
    • Create issue field option
    • Get selectable issue field options
    • Get visible issue field options
    • Get issue field option
    • Update issue field option
    • Delete issue field option
    • Replace issue field option
  • Issue field configurations
    • Get all field configurations
    • Create field configuration
    • Update field configuration
    • Delete field configuration
    • Get field configuration items
    • Update field configuration items
    • Get all field configuration schemes
    • Create field configuration scheme
    • Get field configuration issue type items
    • Get field configuration schemes for projects
    • Assign field configuration scheme to project
    • Update field configuration scheme
    • Delete field configuration scheme
    • Assign issue types to field configurations
    • Remove issue types from field configuration scheme
  • Filters
    • Create filter
    • Get favorite filters
    • Get my filters
    • Search for filters
    • Get filter
    • Update filter
    • Delete filter
    • Get columns
    • Set columns
    • Reset columns
    • Add filter as favorite
    • Remove filter as favorite
    • Change filter owner
  • Filter sharing
    • Get default share scope
    • Set default share scope
    • Get share permissions
    • Add share permission
    • Get share permission
    • Delete share permission
  • Groups
    • Get group
    • Create group
    • Remove group
    • Bulk get groups
    • Get users from group
    • Add user to group
    • Remove user from group
    • Find groups
  • Group and user picker
    • Find users and groups
  • License metrics
    • Get license
    • Get approximate license count
    • Get approximate application license count
  • Issue search
    • Get issue picker suggestions
    • Check issues against JQL
    • Search for issues using JQL (GET)
    • Search for issues using JQL (POST)
  • Issue properties
    • Bulk set issues properties by list
    • Bulk set issue properties by issue
    • Bulk set issue property
    • Bulk delete issue property
    • Get issue property keys
    • Get issue property
    • Set issue property
    • Delete issue property
  • Issue watchers
    • Get is watching issue bulk
    • Get issue watchers
    • Add watcher
    • Delete watcher
  • Issue remote links
    • Get remote issue links
    • Create or update remote issue link
    • Delete remote issue link by global ID
    • Get remote issue link by ID
    • Update remote issue link by ID
    • Delete remote issue link by ID
  • Issue votes
    • Get votes
    • Add vote
    • Delete vote
  • Issue worklogs
    • Get issue worklogs
    • Add worklog
    • Get worklog
    • Update worklog
    • Delete worklog
    • Get IDs of deleted worklogs
    • Get worklogs
    • Get IDs of updated worklogs
  • Issue worklog properties
    • Get worklog property keys
    • Get worklog property
    • Set worklog property
    • Delete worklog property
  • Issue links
    • Create issue link
    • Get issue link
    • Delete issue link
  • Issue link types
    • Get issue link types
    • Create issue link type
    • Get issue link type
    • Update issue link type
    • Delete issue link type
  • Issue security schemes
    • Get issue security schemes
    • Create issue security scheme
    • Get issue security levels
    • Set default issue security levels
    • Get issue security level members
    • Get projects using issue security schemes
    • Associate security scheme to project
    • Search issue security schemes
    • Get issue security scheme
    • Update issue security scheme
    • Delete issue security scheme
    • Add issue security levels
    • Update issue security level
    • Remove issue security level
    • Add issue security level members
    • Remove member from issue security level
  • Issue security level
    • Get issue security level members
    • Get issue security level
  • Issue types
    • Get all issue types for user
    • Create issue type
    • Get issue types for project
    • Get issue type
    • Update issue type
    • Delete issue type
    • Get alternative issue types
    • Load issue type avatar
  • Issue type properties
    • Get issue type property keys
    • Get issue type property
    • Set issue type property
    • Delete issue type property
  • Issue type schemes
    • Get all issue type schemes
    • Create issue type scheme
    • Get issue type scheme items
    • Get issue type schemes for projects
    • Assign issue type scheme to project
    • Update issue type scheme
    • Delete issue type scheme
    • Add issue types to issue type scheme
    • Change order of issue types
    • Remove issue type from issue type scheme
  • Issue type screen schemes
    • Get issue type screen schemes
    • Create issue type screen scheme
    • Get issue type screen scheme items
    • Get issue type screen schemes for projects
    • Assign issue type screen scheme to project
    • Update issue type screen scheme
    • Delete issue type screen scheme
    • Append mappings to issue type screen scheme
    • Update issue type screen scheme default screen scheme
    • Remove mappings from issue type screen scheme
    • Get issue type screen scheme projects
  • JQL
    • Get field reference data (GET)
    • Get field reference data (POST)
    • Get field auto complete suggestions
    • Parse JQL query
    • Convert user identifiers to account IDs in JQL queries
    • Sanitize JQL queries
  • JQL functions (apps)
    • Get precomputations (apps)
    • Update precomputations (apps)
  • Labels
    • Get all labels
  • Permissions
    • Get my permissions
    • Get all permissions
    • Get bulk permissions
    • Get permitted projects
  • Myself
    • Get preference
    • Set preference
    • Delete preference
    • Get locale
    • Set locale
    • Delete locale
    • Get current user
  • Issue notification schemes
    • Get notification schemes paginated
    • Create notification scheme
    • Get projects using notification schemes paginated
    • Get notification scheme
    • Update notification scheme
    • Add notifications to notification scheme
    • Delete notification scheme
    • Remove notification from notification scheme
  • Permission schemes
    • Get all permission schemes
    • Create permission scheme
    • Get permission scheme
    • Update permission scheme
    • Delete permission scheme
    • Get permission scheme grants
    • Create permission grant
    • Get permission scheme grant
    • Delete permission scheme grant
  • Issue priorities
    • Get priorities
    • Create priority
    • Set default priority
    • Move priorities
    • Search priorities
    • Get priority
    • Update priority
    • Delete priority
  • Projects
    • Get all projects
    • Create project
    • Get recent projects
    • Get projects paginated
    • Get project
    • Update project
    • Delete project
    • Archive project
    • Delete project asynchronously
    • Restore deleted or archived project
    • Get all statuses for project
    • Get project issue type hierarchy
    • Get project notification scheme
  • Project types
    • Get all project types
    • Get licensed project types
    • Get project type by key
    • Get accessible project type by key
  • Project avatars
    • Set project avatar
    • Delete project avatar
    • Load project avatar
    • Get all project avatars
  • Project features
    • Get project features
    • Set project feature state
  • Project properties
    • Get project property keys
    • Get project property
    • Set project property
    • Delete project property
  • Project roles
    • Get project roles for project
    • Get project role for project
    • Get project role details
    • Get all project roles
    • Create project role
    • Get project role by ID
    • Fully update project role
    • Partial update project role
    • Delete project role
  • Project role actors
    • Set actors for project role
    • Add actors to project role
    • Delete actors from project role
    • Get default actors for project role
    • Add default actors to project role
    • Delete default actors from project role
  • Project versions
    • Get project versions paginated
    • Get project versions
    • Create version
    • Get version
    • Update version
    • Delete version
    • Merge versions
    • Move version
    • Get version's related issues count
    • Delete and replace version
    • Get version's unresolved issues count
  • Project email
    • Get project's sender email
    • Set project's sender email
  • Project permission schemes
    • Get project issue security scheme
    • Get assigned permission scheme
    • Assign permission scheme
    • Get project issue security levels
  • Project categories
    • Get all project categories
    • Create project category
    • Get project category by ID
    • Update project category
    • Delete project category
  • Project key and name validation
    • Validate project key
    • Get valid project key
    • Get valid project name
  • Issue resolutions
    • Get resolutions
    • Create resolution
    • Set default resolution
    • Move resolutions
    • Search resolutions
    • Get resolution
    • Update resolution
    • Delete resolution
  • Screen tabs
    • Get all screen tabs
    • Create screen tab
    • Update screen tab
    • Delete screen tab
    • Move screen tab
  • Screen tab fields
    • Get all screen tab fields
    • Add screen tab field
    • Remove screen tab field
    • Move screen tab field
  • Screen schemes
    • Get screen schemes
    • Create screen scheme
    • Update screen scheme
    • Delete screen scheme
  • Server info
    • Get Jira instance info
  • Issue navigator settings
    • Get issue navigator default columns
    • Set issue navigator default columns
  • Workflow statuses
    • Get all statuses
    • Get status
  • Workflow status categories
    • Get all status categories
    • Get status category
  • Status
    • Bulk get statuses
    • Bulk update statuses
    • Bulk create statuses
    • Bulk delete Statuses
    • Search statuses paginated
  • Tasks
    • Get task
    • Cancel task
  • UI modifications (apps)
    • Get UI modifications
    • Create UI modification
    • Update UI modification
    • Delete UI modification
  • Users
    • Get user
    • Create user
    • Delete user
    • Bulk get users
    • Get account IDs for users
    • Get user default columns
    • Set user default columns
    • Reset user default columns
    • Get user email
    • Get user email bulk
    • Get user groups
    • Get all users default
    • Get all users
  • User search
    • Find users assignable to projects
    • Find users assignable to issues
    • Find users with permissions
    • Find users for picker
    • Find users
    • Find users by query
    • Find user keys by query
    • Find users with browse permission
  • User properties
    • Get user property keys
    • Get user property
    • Set user property
    • Delete user property
  • Webhooks
    • Get dynamic webhooks for app
    • Register dynamic webhooks
    • Delete webhooks by ID
    • Get failed webhooks
    • Extend webhook life
  • Workflows
    • Get all workflows
    • Create workflow
    • Get workflows paginated
    • Delete inactive workflow
    • Bulk get workflows
    • Get available workflow capabilities
    • Bulk create workflows
    • Validate create workflows
    • Bulk update workflows
    • Validate update workflows
  • Workflow transition rules
    • Get workflow transition rule configurations
    • Update workflow transition rule configurations
    • Delete workflow transition rule configurations
  • Workflow transition properties
    • Get workflow transition properties
    • Update workflow transition property
    • Create workflow transition property
    • Delete workflow transition property
  • Workflow schemes
    • Get all workflow schemes
    • Create workflow scheme
    • Get workflow scheme
    • Update workflow scheme
    • Delete workflow scheme
    • Get default workflow
    • Update default workflow
    • Delete default workflow
    • Get workflow for issue type in workflow scheme
    • Set workflow for issue type in workflow scheme
    • Delete workflow for issue type in workflow scheme
    • Get issue types for workflows in workflow scheme
    • Set issue types for workflow in workflow scheme
    • Delete issue types for workflow in workflow scheme
  • Workflow scheme project associations
    • Get workflow scheme project associations
    • Assign workflow scheme to project
  • Workflow scheme drafts
    • Create draft workflow scheme
    • Get draft workflow scheme
    • Update draft workflow scheme
    • Delete draft workflow scheme
    • Get draft default workflow
    • Update draft default workflow
    • Delete draft default workflow
    • Get workflow for issue type in draft workflow scheme
    • Set workflow for issue type in draft workflow scheme
    • Delete workflow for issue type in draft workflow scheme
    • Publish draft workflow scheme
    • Get issue types for workflows in draft workflow scheme
    • Set issue types for workflow in workflow scheme
    • Delete issue types for workflow in draft workflow scheme
  • App properties
    • Get app properties
    • Get app property
    • Set app property
    • Delete app property
    • Set app property (Forge)
    • Delete app property (Forge)
  • Dynamic modules
    • Get modules
    • Register modules
    • Remove modules
  • App migration
    • Bulk update custom field value
    • Bulk update entity properties
    • Get workflow transition rule configurations
  1. Jira expressions

Evaluate Jira expression

POST
/rest/api/3/expression/eval
Jira expressions
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 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): 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.
issues (List of Issues): A collection of issues matching a JQL query. Available only when JQL 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.
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 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.
This operation can be accessed anonymously.
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).
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://jira.local:8080/jira/rest//rest/api/3/expression/eval' \
--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,
                "query": "project = HSP",
                "startAt": 0,
                "validation": "strict"
            }
        },
        "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}"
}'
Response Response Example
200 - Success
{
  "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": {
        "startAt": 0,
        "maxResults": 1000,
        "count": 140,
        "totalCount": 140,
        "validationWarnings": [
          "There is a problem with the JQL query."
        ]
      }
    }
  }
}

Request

Query Params
expand
string 
optional
Use expand to include additional information in the response. This parameter accepts meta.complexity that returns information about the expression complexity. For example, the number of expensive operations used by the expression and how close the expression is to reaching the complexity limit. Useful when designing and debugging your expressions.
Body Params application/json
context
object 
optional
The context in which the Jira expression is evaluated.
board
integer <int64>
optional
The ID of the board that is available under the board variable when evaluating the expression.
custom
array[null (CustomContextVariable) {3}] 
optional
Custom context variables and their types. These variable types are available for use in a custom context:
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.
customerRequest
integer <int64>
optional
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
object 
optional
The issue that is available under the issue variable when evaluating the expression.
issues
object 
optional
The collection of issues that is available under the issues variable when evaluating the expression.
project
object 
optional
The project that is available under the project variable when evaluating the expression.
serviceDesk
integer <int64>
optional
The ID of the service desk that is available under the serviceDesk variable when evaluating the expression.
sprint
integer <int64>
optional
The ID of the sprint that is available under the sprint variable when evaluating the expression.
expression
string 
required
The Jira expression to evaluate.
Example:
{ key: issue.key, type: issue.issueType.name, links: issue.links.map(link => link.linkedIssue.id) }
Examples

Responses

🟢200Returned if the evaluation results in a value. The result is a JSON primitive value, list, or object.
application/json
Body
The result of evaluating a Jira expression.
meta
object 
optional
Contains various characteristics of the performed expression evaluation.
complexity
object 
optional
Contains information about the expression complexity. For example, the number of steps it took to evaluate the expression.
issues
object 
optional
Contains information about the issues variable in the context. For example, is the issues were loaded with JQL, information about the page will be included here.
value
required
The value of the evaluated expression. It may be a primitive JSON value or a Jira REST API object. (Some expressions do not produce any meaningful results—for example, an expression that returns a lambda function—if that's the case a simple string representation is returned. These string representations should not be relied upon and may change without notice.)
đźź 400Returned 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 r
đźź 401Returned if the authentication credentials are incorrect or missing.
đźź 404Returned if any object provided in the request context is not found or the user does not have permission to view it.
Modified at 2023-07-13 03:27:27
Previous
Analyse Jira expression
Next
Get fields
Built with