workflowscheme
assign-scheme-to-project
Assign workflow scheme to project
Assigns a workflow scheme to a project. This operation is performed only when there are no issues in the project.
Workflow schemes can only be assigned to classic projects.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/workflowscheme/project
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
jr workflowscheme assign-scheme-to-projectcreate-workflow-scheme
Create workflow scheme
Creates a workflow scheme.
Permissions required: Administer Jira global permission.
POST /rest/api/3/workflowscheme
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
jr workflowscheme create-workflow-schemecreate-workflow-scheme-draft-from-parent
Create draft workflow scheme
Create a draft workflow scheme from an active workflow scheme, by copying the active workflow scheme. Note that an active workflow scheme can only have one draft workflow scheme.
Permissions required: Administer Jira global permission.
POST /rest/api/3/workflowscheme/{id}/createdraft
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the active workflow scheme that the draft is created from. |
Example:
jr workflowscheme create-workflow-scheme-draft-from-parent --id <id>delete-default-workflow
Delete default workflow
Resets the default workflow for a workflow scheme. That is, the default workflow is set to Jira's system workflow (the jira workflow).
Note that active workflow schemes cannot be edited. If the workflow scheme is active, set updateDraftIfNeeded to true and a draft workflow scheme is created or updated with the default workflow reset. The draft workflow scheme can be published in Jira.
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/workflowscheme/{id}/default
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme. |
--updateDraftIfNeeded | string | No | Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to false. |
Example:
jr workflowscheme delete-default-workflow --id <id>delete-draft-default-workflow
Delete draft default workflow
Resets the default workflow for a workflow scheme's draft. That is, the default workflow is set to Jira's system workflow (the jira workflow).
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/workflowscheme/{id}/draft/default
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
Example:
jr workflowscheme delete-draft-default-workflow --id <id>delete-draft-workflow-mapping
Delete issue types for workflow in draft workflow scheme
Deletes the workflow-issue type mapping for a workflow in a workflow scheme's draft.
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/workflowscheme/{id}/draft/workflow
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
--workflowName | string | No | The name of the workflow. |
Example:
jr workflowscheme delete-draft-workflow-mapping --id <id>delete-workflow-mapping
Delete issue types for workflow in workflow scheme
Deletes the workflow-issue type mapping for a workflow in a workflow scheme.
Note that active workflow schemes cannot be edited. If the workflow scheme is active, set updateDraftIfNeeded to true and a draft workflow scheme is created or updated with the workflow-issue type mapping deleted. The draft workflow scheme can be published in Jira.
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/workflowscheme/{id}/workflow
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme. |
--updateDraftIfNeeded | string | No | Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to false. |
--workflowName | string | No | The name of the workflow. |
Example:
jr workflowscheme delete-workflow-mapping --id <id>delete-workflow-scheme
Delete workflow scheme
Deletes a workflow scheme. Note that a workflow scheme cannot be deleted if it is active (that is, being used by at least one project).
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/workflowscheme/{id}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as schemeId. For example, schemeId=10301. |
Example:
jr workflowscheme delete-workflow-scheme --id <id>delete-workflow-scheme-draft
Delete draft workflow scheme
Deletes a draft workflow scheme.
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/workflowscheme/{id}/draft
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the active workflow scheme that the draft was created from. |
Example:
jr workflowscheme delete-workflow-scheme-draft --id <id>delete-workflow-scheme-draft-issue-type
Delete workflow for issue type in draft workflow scheme
Deletes the issue type-workflow mapping for an issue type in a workflow scheme's draft.
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/workflowscheme/{id}/draft/issuetype/{issueType}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
--issueType | string | Yes | The ID of the issue type. |
Example:
jr workflowscheme delete-workflow-scheme-draft-issue-type --id <id> --issueType <issueType>delete-workflow-scheme-issue-type
Delete workflow for issue type in workflow scheme
Deletes the issue type-workflow mapping for an issue type in a workflow scheme.
Note that active workflow schemes cannot be edited. If the workflow scheme is active, set updateDraftIfNeeded to true and a draft workflow scheme is created or updated with the issue type-workflow mapping deleted. The draft workflow scheme can be published in Jira.
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/workflowscheme/{id}/issuetype/{issueType}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme. |
--issueType | string | Yes | The ID of the issue type. |
--updateDraftIfNeeded | string | No | Set to true to create or update the draft of a workflow scheme and update the mapping in the draft, when the workflow scheme cannot be edited. Defaults to false. |
Example:
jr workflowscheme delete-workflow-scheme-issue-type --id <id> --issueType <issueType>get-all-workflow-schemes
Get all workflow schemes
Returns a paginated list of all workflow schemes, not including draft workflow schemes.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme
| Flag | Type | Required | Description |
|---|---|---|---|
--maxResults | string | No | The maximum number of items to return per page. |
--startAt | string | No | The index of the first item to return in a page of results (page offset). |
Example:
jr workflowscheme get-all-workflow-schemesget-default-workflow
Get default workflow
Returns the default workflow for a workflow scheme. The default workflow is the workflow that is assigned any issue types that have not been mapped to any other workflow. The default workflow has All Unassigned Issue Types listed in its issue types for the workflow scheme in Jira.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme/{id}/default
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme. |
--returnDraftIfExists | string | No | Set to true to return the default workflow for the workflow scheme's draft rather than scheme itself. If the workflow scheme does not have a draft, then the default workflow for the workflow scheme is returned. |
Example:
jr workflowscheme get-default-workflow --id <id>get-draft-default-workflow
Get draft default workflow
Returns the default workflow for a workflow scheme's draft. The default workflow is the workflow that is assigned any issue types that have not been mapped to any other workflow. The default workflow has All Unassigned Issue Types listed in its issue types for the workflow scheme in Jira.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme/{id}/draft/default
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
Example:
jr workflowscheme get-draft-default-workflow --id <id>get-draft-workflow
Get issue types for workflows in draft workflow scheme
Returns the workflow-issue type mappings for a workflow scheme's draft.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme/{id}/draft/workflow
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
--workflowName | string | No | The name of a workflow in the scheme. Limits the results to the workflow-issue type mapping for the specified workflow. |
Example:
jr workflowscheme get-draft-workflow --id <id>get-project-usages-for-workflow-scheme
Get projects which are using a given workflow scheme
Returns a page of projects using a given workflow scheme.
GET /rest/api/3/workflowscheme/{workflowSchemeId}/projectUsages
| Flag | Type | Required | Description |
|---|---|---|---|
--maxResults | string | No | The maximum number of results to return. Must be an integer between 1 and 200. |
--nextPageToken | string | No | The cursor for pagination |
--workflowSchemeId | string | Yes | The workflow scheme ID |
Example:
jr workflowscheme get-project-usages-for-workflow-scheme --workflowSchemeId <workflowSchemeId>get-required-workflow-scheme-mappings
Get required status mappings for workflow scheme update
Gets the required status mappings for the desired changes to a workflow scheme. The results are provided per issue type and workflow. When updating a workflow scheme, status mappings can be provided per issue type, per workflow, or both.
Permissions required:
- Administer Jira permission to update all, including global-scoped, workflow schemes.
- Administer projects project permission to update project-scoped workflow schemes.
POST /rest/api/3/workflowscheme/update/mappings
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
jr workflowscheme get-required-workflow-scheme-mappingsget-workflow
Get issue types for workflows in workflow scheme
Returns the workflow-issue type mappings for a workflow scheme.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme/{id}/workflow
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme. |
--returnDraftIfExists | string | No | Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme is returned. |
--workflowName | string | No | The name of a workflow in the scheme. Limits the results to the workflow-issue type mapping for the specified workflow. |
Example:
jr workflowscheme get-workflow --id <id>get-workflow-scheme
Get workflow scheme
Returns a workflow scheme.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme/{id}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as schemeId. For example, schemeId=10301. |
--returnDraftIfExists | string | No | Returns the workflow scheme's draft rather than scheme itself, if set to true. If the workflow scheme does not have a draft, then the workflow scheme is returned. |
Example:
jr workflowscheme get-workflow-scheme --id <id>get-workflow-scheme-draft
Get draft workflow scheme
Returns the draft workflow scheme for an active workflow scheme. Draft workflow schemes allow changes to be made to the active workflow schemes: When an active workflow scheme is updated, a draft copy is created. The draft is modified, then the changes in the draft are copied back to the active workflow scheme. See Configuring workflow schemes for more information.
Note that:
- Only active workflow schemes can have draft workflow schemes.
- An active workflow scheme can only have one draft workflow scheme.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme/{id}/draft
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the active workflow scheme that the draft was created from. |
Example:
jr workflowscheme get-workflow-scheme-draft --id <id>get-workflow-scheme-draft-issue-type
Get workflow for issue type in draft workflow scheme
Returns the issue type-workflow mapping for an issue type in a workflow scheme's draft.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme/{id}/draft/issuetype/{issueType}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
--issueType | string | Yes | The ID of the issue type. |
Example:
jr workflowscheme get-workflow-scheme-draft-issue-type --id <id> --issueType <issueType>get-workflow-scheme-issue-type
Get workflow for issue type in workflow scheme
Returns the issue type-workflow mapping for an issue type in a workflow scheme.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme/{id}/issuetype/{issueType}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the workflow scheme. |
--issueType | string | Yes | The ID of the issue type. |
--returnDraftIfExists | string | No | Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme is returned. |
Example:
jr workflowscheme get-workflow-scheme-issue-type --id <id> --issueType <issueType>get-workflow-scheme-project-associations
Get workflow scheme project associations
Returns a list of the workflow schemes associated with a list of projects. Each returned workflow scheme includes a list of the requested projects associated with it. Any team-managed or non-existent projects in the request are ignored and no errors are returned.
If the project is associated with the Default Workflow Scheme no ID is returned. This is because the way the Default Workflow Scheme is stored means it has no ID.
Permissions required: Administer Jira global permission.
GET /rest/api/3/workflowscheme/project
| Flag | Type | Required | Description |
|---|---|---|---|
--projectId | string | No | The ID of a project to return the workflow schemes for. To include multiple projects, provide an ampersand-Jim: oneseparated list. For example, projectId=10000&projectId=10001. |
Example:
jr workflowscheme get-workflow-scheme-project-associationspublish-draft-workflow-scheme
Publish draft workflow scheme
Publishes a draft workflow scheme.
Where the draft workflow includes new workflow statuses for an issue type, mappings are provided to update issues with the original workflow status to the new workflow status.
This operation is asynchronous. Follow the location link in the response to determine the status of the task and use Get task to obtain updates.
Permissions required: Administer Jira global permission.
POST /rest/api/3/workflowscheme/{id}/draft/publish
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
--validateOnly | string | No | Whether the request only performs a validation. |
Example:
jr workflowscheme publish-draft-workflow-scheme --id <id>read-workflow-schemes
Bulk get workflow schemes
Returns a list of workflow schemes by providing workflow scheme IDs or project IDs.
Permissions required:
- Administer Jira global permission to access all, including project-scoped, workflow schemes
- Administer projects project permissions to access project-scoped workflow schemes
POST /rest/api/3/workflowscheme/read
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
jr workflowscheme read-workflow-schemesset-workflow-scheme-draft-issue-type
Set workflow for issue type in draft workflow scheme
Sets the workflow for an issue type in a workflow scheme's draft.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/workflowscheme/{id}/draft/issuetype/{issueType}
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
--issueType | string | Yes | The ID of the issue type. |
Example:
jr workflowscheme set-workflow-scheme-draft-issue-type --id <id> --issueType <issueType>set-workflow-scheme-issue-type
Set workflow for issue type in workflow scheme
Sets the workflow for an issue type in a workflow scheme.
Note that active workflow schemes cannot be edited. If the workflow scheme is active, set updateDraftIfNeeded to true in the request body and a draft workflow scheme is created or updated with the new issue type-workflow mapping. The draft workflow scheme can be published in Jira.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/workflowscheme/{id}/issuetype/{issueType}
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the workflow scheme. |
--issueType | string | Yes | The ID of the issue type. |
Example:
jr workflowscheme set-workflow-scheme-issue-type --id <id> --issueType <issueType>switch-workflow-scheme-for-project
Switch workflow scheme for project
Switches a workflow scheme for a project.
Workflow schemes can only be assigned to classic projects.
Calculating required mappings: If statuses from the current workflow scheme won't exist in the target workflow scheme, you must provide mappingsByIssueTypeOverride to specify how issues with those statuses should be migrated. Use the required workflow scheme mappings API to determine which statuses and issue types require mappings.
Permissions required: Administer Jira global permission.
POST /rest/api/3/workflowscheme/project/switch
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
jr workflowscheme switch-workflow-scheme-for-projectupdate-default-workflow
Update default workflow
Sets the default workflow for a workflow scheme.
Note that active workflow schemes cannot be edited. If the workflow scheme is active, set updateDraftIfNeeded to true in the request object and a draft workflow scheme is created or updated with the new default workflow. The draft workflow scheme can be published in Jira.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/workflowscheme/{id}/default
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the workflow scheme. |
Example:
jr workflowscheme update-default-workflow --id <id>update-draft-default-workflow
Update draft default workflow
Sets the default workflow for a workflow scheme's draft.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/workflowscheme/{id}/draft/default
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
Example:
jr workflowscheme update-draft-default-workflow --id <id>update-draft-workflow-mapping
Set issue types for workflow in workflow scheme
Sets the issue types for a workflow in a workflow scheme's draft. The workflow can also be set as the default workflow for the draft workflow scheme. Unmapped issues types are mapped to the default workflow.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/workflowscheme/{id}/draft/workflow
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the workflow scheme that the draft belongs to. |
--workflowName | string | No | The name of the workflow. |
Example:
jr workflowscheme update-draft-workflow-mapping --id <id>update-schemes
Update workflow scheme
Updates company-managed and team-managed project workflow schemes. This API doesn't have a concept of draft, so any changes made to a workflow scheme are immediately available. When changing the available statuses for issue types, an asynchronous task migrates the issues as defined in the provided mappings.
Permissions required:
- Administer Jira project permission to update all, including global-scoped, workflow schemes.
- Administer projects project permission to update project-scoped workflow schemes.
POST /rest/api/3/workflowscheme/update
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
jr workflowscheme update-schemesupdate-workflow-mapping
Set issue types for workflow in workflow scheme
Sets the issue types for a workflow in a workflow scheme. The workflow can also be set as the default workflow for the workflow scheme. Unmapped issues types are mapped to the default workflow.
Note that active workflow schemes cannot be edited. If the workflow scheme is active, set updateDraftIfNeeded to true in the request body and a draft workflow scheme is created or updated with the new workflow-issue types mappings. The draft workflow scheme can be published in Jira.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/workflowscheme/{id}/workflow
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the workflow scheme. |
--workflowName | string | No | The name of the workflow. |
Example:
jr workflowscheme update-workflow-mapping --id <id>update-workflow-scheme
Classic update workflow scheme
Updates a company-manged project workflow scheme, including the name, default workflow, issue type to project mappings, and more. If the workflow scheme is active (that is, being used by at least one project), then a draft workflow scheme is created or updated instead, provided that updateDraftIfNeeded is set to true.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/workflowscheme/{id}
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as schemeId. For example, schemeId=10301. |
Example:
jr workflowscheme update-workflow-scheme --id <id>update-workflow-scheme-draft
Update draft workflow scheme
Updates a draft workflow scheme. If a draft workflow scheme does not exist for the active workflow scheme, then a draft is created. Note that an active workflow scheme can only have one draft workflow scheme.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/workflowscheme/{id}/draft
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the active workflow scheme that the draft was created from. |
Example:
jr workflowscheme update-workflow-scheme-draft --id <id>