GET /rest/api/2/workflows/capabilities

Get the list of workflow capabilities for a specific workflow using either the workflow ID, or the project and issue type ID pair. The response includes the scope of the workflow, defined as global/project-based, and a list of project types that the workflow is scoped to. It also includes all rules organised into their broad categories (conditions, validators, actions, triggers, screens) as well as the source location (Atlassian-provided, Connect, Forge).

Permissions required:

The current list of Atlassian-provided rules:

Validators

A validator rule that checks if a user has the required permissions to execute the transition in the workflow.

Permission validator

A validator rule that checks if a user has the required permissions to execute the transition in the workflow.

{
   "ruleKey": "system:check-permission-validator",
   "parameters": {
     "permissionKey": "ADMINISTER_PROJECTS"
   }
 }

Parameters:

Parent or child blocking validator

A validator to block the child issue's transition depending on the parent issue's status.

{
   "ruleKey" : "system:parent-or-child-blocking-validator"
   "parameters" : {
     "blocker" : "PARENT"
     "statusIds" : "1,2,3"
   }
 }

Parameters:

Previous status validator

A validator that checks if an issue has transitioned through specified previous status(es) before allowing the current transition to occur.

{
   "ruleKey": "system:previous-status-validator",
   "parameters": {
     "previousStatusIds": "10014",
     "mostRecentStatusOnly": "true"
   }
 }

Parameters:

Validate a field value

A validation that ensures a specific field's value meets the defined criteria before allowing an issue to transition in the workflow.

Depending on the rule type, the result will vary:

Field required
{
   "ruleKey": "system:validate-field-value",
   "parameters": {
     "ruleType": "fieldRequired",
     "fieldsRequired": "assignee",
     "ignoreContext": "true",
     "errorMessage": "An assignee must be set!"
   }
 }

Parameters:

Field changed
{
   "ruleKey": "system:validate-field-value",
   "parameters": {
     "ruleType": "fieldChanged",
     "groupsExemptFromValidation": "6862ac20-8672-4f68-896d-4854f5efb79e",
     "fieldKey": "versions",
     "errorMessage": "Affect versions must be modified before transition"
   }
 }

Parameters:

Field has a single value
{
   "ruleKey": "system:validate-field-value",
   "parameters": {
     "ruleType": "fieldHasSingleValue",
     "fieldKey": "created",
     "excludeSubtasks": "true"
   }
 }

Parameters:

Field matches regular expression
{
   "ruleKey": "system:validate-field-value",
   "parameters": {
     "ruleType": "fieldMatchesRegularExpression",
     "regexp": "[0-9]{4}",
     "fieldKey": "description"
   }
 }

Parameters:

Date field comparison
{
   "ruleKey": "system:validate-field-value",
   "parameters": {
     "ruleType": "dateFieldComparison",
     "date1FieldKey": "duedate",
     "date2FieldKey": "customfield_10054",
     "includeTime": "true",
     "conditionSelected": ">="
   }
 }

Parameters:

Date range comparison
{
   "ruleKey": "system:validate-field-value",
   "parameters": {
     "ruleType": "windowDateComparison",
     "date1FieldKey": "customfield_10009",
     "date2FieldKey": "customfield_10054",
     "numberOfDays": "3"
   }
 }

Parameters:

This rule is composed by aggregating the following legacy rules:

Pro forma: Forms attached validator

Validates that one or more forms are attached to the issue.

{
   "ruleKey" : "system:proforma-forms-attached"
   "parameters" : {}
 }
Proforma: Forms submitted validator

Validates that all forms attached to the issue have been submitted.

{
   "ruleKey" : "system:proforma-forms-submitted"
   "parameters" : {}
 }

Conditions

Conditions enable workflow rules that govern whether a transition can execute.

Check field value

A condition rule evaluates as true if a specific field's value meets the defined criteria. This rule ensures that an issue can only transition to the next step in the workflow if the field's value matches the desired condition.

{
   "ruleKey": "system:check-field-value",
   "parameters": {
     "fieldId": "description",
     "fieldValue": "[\"Done\"]",
     "comparator": "=",
     "comparisonType": "STRING"
   }
 }

Parameters:

Restrict issue transition

This rule ensures that issue transitions are restricted based on user accounts, roles, group memberships, and permissions, maintaining control over who can transition an issue. This condition evaluates as true if any of the following criteria is met.

{
   "ruleKey": "system:restrict-issue-transition",
   "parameters": {
     "accountIds": "allow-reporter,5e68ac137d64450d01a77fa0",
     "roleIds": "10002,10004",
     "groupIds": "703ff44a-7dc8-4f4b-9aa6-a65bf3574fa4",
     "permissionKeys": "ADMINISTER_PROJECTS",
     "groupCustomFields": "customfield_10028",
     "allowUserCustomFields": "customfield_10072,customfield_10144,customfield_10007",
     "denyUserCustomFields": "customfield_10107"
   }
 }

Parameters:

This rule is composed by aggregating the following legacy rules:

Previous status condition

A condition that evaluates based on an issue's previous status(es) and specific criteria.

{
   "ruleKey" : "system:previous-status-condition"
   "parameters" : {
     "previousStatusIds" : "10004",
     "not": "true",
     "mostRecentStatusOnly" : "true",
     "includeCurrentStatus": "true",
     "ignoreLoopTransitions": "true"
   }
 }

Parameters:

Parent or child blocking condition

A condition to block the parent\u2019s issue transition depending on the child\u2019s issue status.

{
   "ruleKey" : "system:parent-or-child-blocking-condition"
   "parameters" : {
     "blocker" : "CHILD",
     "statusIds" : "1,2,3"
   }
 }

Parameters:

Separation of duties

A condition preventing the user from performing, if the user has already performed a transition on the issue.

{
   "ruleKey": "system:separation-of-duties",
   "parameters": {
     "fromStatusId": "10161",
     "toStatusId": "10160"
   }
 }

Parameters:

Restrict transitions

A condition preventing all users from transitioning the issue can also optionally include APIs as well.

{
   "ruleKey": "system:restrict-from-all-users",
   "parameters": {
     "restrictMode": "users"
   }
 }

Parameters:

Jira Service Management block until approved

Block an issue transition until approval. Note: This is only supported in team-managed projects.

{
   "ruleKey": "system:jsd-approvals-block-until-approved",
   "parameters": {
     "approvalConfigurationJson": "{"statusExternalUuid...}"
   }
 }

Parameters:

Jira Service Management block until rejected

Block an issue transition until rejected. Note: This is only supported in team-managed projects.

{
   "ruleKey": "system:jsd-approvals-block-until-rejected",
   "parameters": {
     "approvalConfigurationJson": "{"statusExternalUuid...}"
   }
 }

Parameters:

Block in progress approval

Condition to block issue transition if there is pending approval. Note: This is only supported in company-managed projects.

{
   "ruleKey": "system:block-in-progress-approval",
   "parameters": {}
 }

Post functions

Post functions carry out any additional processing required after a workflow transition is executed.

Change assignee

A post function rule that changes the assignee of an issue after a transition.

{
   "ruleKey": "system:change-assignee",
   "parameters": {
     "type": "to-selected-user",
     "accountId": "example-account-id"
   }
 }

Parameters:

Copy field value

A post function that automates the process of copying values between fields during a specific transition, ensuring data consistency and reducing manual effort.

{
   "ruleKey": "system:copy-value-from-other-field",
   "parameters": {
     "sourceFieldKey": "description",
     "targetFieldKey": "components",
     "issueSource": "SAME"
   }
 }

Parameters:

Update field

A post function that updates or appends a specific field with the given value.

{
   "ruleKey": "system:update-field",
   "parameters": {
     "field": "customfield_10056",
     "value": "asdf",
     "mode": "append"
   }
 }

Parameters:

Trigger webhook

A post function that automatically triggers a predefined webhook when a transition occurs in the workflow.

{
   "ruleKey": "system:trigger-webhook",
   "parameters": {
     "webhookId": "1"
   }
 }

Parameters:

Screen

Remind people to update fields

A screen rule that prompts users to update a specific field when they interact with an issue screen during a transition. This rule is useful for ensuring that users provide or modify necessary information before moving an issue to the next step in the workflow.

{
   "ruleKey": "system:remind-people-to-update-fields",
   "params": {
     "remindingFieldIds": "assignee,customfield_10025",
     "remindingMessage": "The message",
     "remindingAlwaysAsk": "true"
   }
 }

Parameters:

Shared transition screen

A common screen that is shared between transitions in a workflow.

{
   "ruleKey": "system:transition-screen",
   "params": {
     "screenId": "3"
   }
 }

Parameters:

Connect & Forge

Connect rules

Validator/Condition/Post function for Connect app.

{
   "ruleKey": "connect:expression-validator",
   "parameters": {
     "appKey": "com.atlassian.app",
     "config": "",
     "id": "90ce590f-e90c-4cd3-8281-165ce41f2ac3",
     "disabled": "false",
     "tag": ""
   }
 }

Parameters:

Forge rules

Validator/Condition/Post function for Forge app.

{
   "ruleKey": "forge:expression-validator",
   "parameters": {
     "key": "ari:cloud:ecosystem::extension/{appId}/{environmentId}/static/{moduleKey}",
     "config": "{"searchString":"workflow validator"}",
     "id": "a865ddf6-bb3f-4a7b-9540-c2f8b3f9f6c2"
   }
 }

Parameters:

Servers

Query parameters

Name Type Required Description
projectId String No
workflowId String No
issueTypeId String No

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.