POST /rest/api/2/workflows/update

Update workflows and related statuses.

Permissions required:

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
expand String No

Use expand to include additional information in the response. This parameter accepts a comma-separated list. Expand options include:

  • workflows.usages Returns the project and issue types that each workflow is associated with.
  • statuses.usages Returns the project and issue types that each status is associated with.

Request body fields

Name Type Required Description
workflows[] Array No

The details of the workflows to update.

workflows[].id String Yes

The ID of this workflow.

workflows[].transitions[] Array Yes

The transitions of this workflow.

workflows[].transitions[].customIssueEventId String No

The custom event ID of the transition.

workflows[].transitions[].description String No

The description of the transition.

workflows[].transitions[].transitionScreen Object No

The configuration of the rule.

workflows[].transitions[].transitionScreen.id String No

The ID of the rule.

workflows[].transitions[].transitionScreen.ruleKey String Yes

The rule key of the rule.

workflows[].transitions[].transitionScreen.parameters Object No

The parameters related to the rule.

workflows[].transitions[].properties Object No

The properties of the transition.

workflows[].transitions[].triggers[] Array No

The triggers of the transition.

workflows[].transitions[].triggers[].id String No

The ID of the trigger.

workflows[].transitions[].triggers[].ruleKey String Yes

The rule key of the trigger.

workflows[].transitions[].triggers[].parameters Object Yes

The parameters of the trigger.

workflows[].transitions[].conditions Object No

The conditions group associated with the transition.

workflows[].transitions[].conditions.operation String Yes

Determines how the conditions in the group are evaluated. Accepts either ANY or ALL. If ANY is used, at least one condition in the group must be true for the group to evaluate to true. If ALL is used, all conditions in the group must be true for the group to evaluate to true.

Possible values:

  • "ANY"
  • "ALL"
workflows[].transitions[].conditions.conditions[] Array No

The rules for this condition.

workflows[].transitions[].conditions.conditions[].id String No

The ID of the rule.

workflows[].transitions[].conditions.conditions[].ruleKey String Yes

The rule key of the rule.

workflows[].transitions[].conditions.conditions[].parameters Object No

The parameters related to the rule.

workflows[].transitions[].conditions.conditionGroups[] Array No

The nested conditions of the condition group.

workflows[].transitions[].links[] Array No

The statuses the transition can start from, and the mapping of ports between the statuses.

workflows[].transitions[].links[].fromStatusReference String No

The status that the transition starts from.

workflows[].transitions[].links[].toPort Integer No

The port that the transition goes to.

workflows[].transitions[].links[].fromPort Integer No

The port that the transition starts from.

workflows[].transitions[].id String No

The ID of the transition.

workflows[].transitions[].validators[] Array No

The validators of the transition.

workflows[].transitions[].validators[].id String No

The ID of the rule.

workflows[].transitions[].validators[].ruleKey String Yes

The rule key of the rule.

workflows[].transitions[].validators[].parameters Object No

The parameters related to the rule.

workflows[].transitions[].actions[] Array No

The post-functions of the transition.

workflows[].transitions[].actions[].id String No

The ID of the rule.

workflows[].transitions[].actions[].ruleKey String Yes

The rule key of the rule.

workflows[].transitions[].actions[].parameters Object No

The parameters related to the rule.

workflows[].transitions[].name String No

The name of the transition.

workflows[].transitions[].type String No

The transition type.

Possible values:

  • "DIRECTED"
  • "INITIAL"
  • "GLOBAL"
workflows[].transitions[].toStatusReference String No

The status the transition goes to.

workflows[].loopedTransitionContainerLayout Object No

The starting point for the statuses in the workflow.

workflows[].loopedTransitionContainerLayout.x Number No

The x axis location.

workflows[].loopedTransitionContainerLayout.y Number No

The y axis location.

workflows[].description String No

The new description for this workflow.

workflows[].startPointLayout Object No

The starting point for the statuses in the workflow.

workflows[].startPointLayout.x Number No

The x axis location.

workflows[].startPointLayout.y Number No

The y axis location.

workflows[].version Object Yes

The current version details of this workflow scheme.

workflows[].version.id String No

The version UUID.

workflows[].version.versionNumber Integer No

The version number.

workflows[].statuses[] Array Yes

The statuses associated with this workflow.

workflows[].statuses[].layout Object No

The starting point for the statuses in the workflow.

workflows[].statuses[].layout.x Number No

The x axis location.

workflows[].statuses[].layout.y Number No

The y axis location.

workflows[].statuses[].properties Object Yes

The properties for this status layout.

workflows[].statuses[].approvalConfiguration Object No

The approval configuration of a status within a workflow. Applies only to Jira Service Management approvals.

workflows[].statuses[].approvalConfiguration.fieldId String Yes

The custom field ID of the "Approvers" or "Approver Groups" field.

workflows[].statuses[].approvalConfiguration.prePopulatedFieldId String No

The custom field ID of the field used to pre-populate the Approver field. Only supports the "Affected Services" field.

workflows[].statuses[].approvalConfiguration.active String Yes

Whether the approval configuration is active.

Possible values:

  • "false"
  • "true"
workflows[].statuses[].approvalConfiguration.conditionValue String Yes

The number or percentage of approvals required for a request to be approved. If conditionType is number, the value must be 20 or less. If conditionType is percent, the value must be 100 or less.

workflows[].statuses[].approvalConfiguration.transitionRejected String Yes

The numeric ID of the transition to be executed if the request is declined.

workflows[].statuses[].approvalConfiguration.conditionType String Yes

How the required approval count is calculated. It may be configured to require a specific number of approvals, or approval by a percentage of approvers. If the approvers source field is Approver groups, you can configure how many approvals per group are required for the request to be approved. The number will be the same across all groups.

Possible values:

  • "percent"
  • "numberPerPrincipal"
  • "number"
workflows[].statuses[].approvalConfiguration.transitionApproved String Yes

The numeric ID of the transition to be executed if the request is approved.

workflows[].statuses[].approvalConfiguration.exclude[] Array No

A list of roles that should be excluded as possible approvers.

Possible values:

  • "reporter"
  • "assignee"
workflows[].statuses[].statusReference String Yes

A unique ID which the status will use to refer to this layout configuration.

workflows[].statusMappings[] Array No

The mapping of old to new status ID for a specific project and issue type.

workflows[].statusMappings[].projectId String Yes

The project for the status mapping.

workflows[].statusMappings[].statusMigrations[] Array Yes

The list of old and new status ID mappings for the specified project and issue type.

workflows[].statusMappings[].statusMigrations[].newStatusReference String Yes

The new status ID.

workflows[].statusMappings[].statusMigrations[].oldStatusReference String Yes

The old status ID.

workflows[].statusMappings[].issueTypeId String Yes

The issue type for the status mapping.

workflows[].defaultStatusMappings[] Array No

The mapping of old to new status ID.

workflows[].defaultStatusMappings[].newStatusReference String Yes

The new status ID.

workflows[].defaultStatusMappings[].oldStatusReference String Yes

The old status ID.

statuses[] Array No

The statuses to associate with the workflows.

statuses[].id String No

The ID of the status.

statuses[].name String Yes

The name of the status.

statuses[].description String No

The description of the status.

statuses[].statusCategory String Yes

The category of the status.

Possible values:

  • "TODO"
  • "DONE"
  • "IN_PROGRESS"
statuses[].statusReference String Yes

The reference of the status.

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.