This resource represents workflow schemes. Use it to manage workflow schemes and the workflow scheme's workflows and issue types.
A workflow scheme maps issue types to workflows. A workflow scheme can be associated with one or more projects, which enables the projects to use the workflow-issue type mappings.
Active workflow schemes (workflow schemes that are used by projects) cannot be edited. When an active workflow scheme is edited, a draft copy of the scheme is created. The draft workflow scheme is then be edited and published (replacing the active scheme).
See Configuring workflow schemes for more information.
Returns a paginated list of all workflow schemes, not including draft workflow schemes.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:workflow-scheme:jira
, read:application-role:jira
, read:avatar:jira
, read:group:jira
, read:issue-type:jira
...(Show more)Connect app scope required: ADMIN
integer
integer
Returned if the request is successful.
A page of items.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"isLast": true,
"maxResults": 50,
"startAt": 0,
"total": 2,
"values": [
{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"id": 101010,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
},
{
"defaultWorkflow": "jira",
"description": "The description of the another example workflow scheme.",
"id": 101011,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Another example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101011"
}
]
}
Creates a workflow scheme.
Permissions required: Administer Jira global permission.
manage:jira-configuration
write:workflow-scheme:jira
, read:application-role:jira
, read:avatar:jira
, read:group:jira
, read:issue-type:jira
...(Show more)Connect app scope required: ADMIN
string
string
object
string
boolean
Returned if the request is successful.
Details about a workflow scheme.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"draft": false,
"id": 101010,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
}
Returns a list of workflow schemes by providing workflow scheme IDs or project IDs.
Permissions required:
manage:jira-configuration
read:workflow-scheme:jira
Connect app scope required: ADMIN
string
array<string>
array<string>
Returned if the request is successful.
array<WorkflowSchemeReadResponse>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"projectIds": [
"10047",
"10048"
],
"workflowSchemeIds": [
"3e59db0f-ed6c-47ce-8d50-80c0c4572677"
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/read`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[
{
"defaultWorkflow": {
"description": "This is the default workflow for Software Development projects.",
"id": "3e59db0f-ed6c-47ce-8d50-80c0c4572677",
"name": "Default Software Development Workflow",
"usage": [
{
"issueTypeIds": [],
"projectId": "10047"
}
],
"version": {
"id": "657812fc-bc72-400f-aae0-df8d88db3d9g",
"versionNumber": 1
}
},
"description": "This is the workflow scheme for the Software Development project type.",
"id": "3g78dg2a-ns2n-56ab-9812-42h5j1464567",
"name": "Software Developer Workflow Scheme",
"projectIdsUsingScheme": [
"10047"
],
"scope": {
"project": {
"id": "10047"
},
"type": "GLOBAL"
},
"taskId": "3f83dg2a-ns2n-56ab-9812-42h5j1461629",
"version": {
"id": "527213fc-bc72-400f-aae0-df8d88db2c8a",
"versionNumber": 1
},
"workflowsForIssueTypes": [
{
"issueTypeIds": [
"10013"
],
"workflow": {
"description": "This is the workflow for the Software Development bug issue type.",
"id": "5e79ae0f-ed6c-47ce-8d50-80c0c4572745",
"name": "Software Development Bug Workflow",
"usage": [
{
"issueTypeIds": [
"10013"
],
"projectId": "10047"
}
],
"version": {
"id": "897812dc-bc72-400f-aae0-df8d88fe3d8f",
"versionNumber": 1
}
}
}
]
}
]
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:
manage:jira-configuration
write:workflow-scheme:jira
Connect app scope required: ADMIN
string
string
Requiredstring
Requiredstring
Requiredarray<MappingsByIssueTypeOverride>
array<MappingsByWorkflow>
DocumentVersion
Requiredarray<WorkflowSchemeAssociation>
any
Returned if the request is successful and there is no asynchronous task.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"defaultWorkflowId": "3e59db0f-ed6c-47ce-8d50-80c0c4572677",
"description": "description",
"id": "10000",
"name": "name",
"statusMappingsByIssueTypeOverride": [
{
"issueTypeId": "10001",
"statusMappings": [
{
"newStatusId": "2",
"oldStatusId": "1"
},
{
"newStatusId": "4",
"oldStatusId": "3"
}
]
},
{
"issueTypeId": "10002",
"statusMappings": [
{
"newStatusId": "4",
"oldStatusId": "1"
},
{
"newStatusId": "2",
"oldStatusId": "3"
}
]
}
],
"statusMappingsByWorkflows": [
{
"newWorkflowId": "3e59db0f-ed6c-47ce-8d50-80c0c4572677",
"oldWorkflowId": "3e59db0f-ed6c-47ce-8d50-80c0c4572677",
"statusMappings": [
{
"newStatusId": "2",
"oldStatusId": "1"
},
{
"newStatusId": "4",
"oldStatusId": "3"
}
]
}
],
"version": {
"id": "527213fc-bc72-400f-aae0-df8d88db2c8a",
"versionNumber": 1
},
"workflowsForIssueTypes": [
{
"issueTypeIds": [
"10000",
"10003"
],
"workflowId": "3e59db0f-ed6c-47ce-8d50-80c0c4572677"
},
{
"issueTypeIds": [
"10001`",
"10002"
],
"workflowId": "3f83dg2a-ns2n-56ab-9812-42h5j1461629"
}
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/update`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
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:
manage:jira-configuration
write:workflow-scheme:jira
Connect app scope required: ADMIN
string
string
Requiredarray<WorkflowSchemeAssociation>
RequiredReturned if the request is successful.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"defaultWorkflowId": "10010",
"id": "10001",
"workflowsForIssueTypes": [
{
"issueTypeIds": [
"10010",
"10011"
],
"workflowId": "10001"
}
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/update/mappings`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"statusMappingsByIssueTypes": [
{
"issueTypeId": "10000",
"statusIds": [
"10000",
"10001"
]
}
],
"statusMappingsByWorkflows": [
{
"sourceWorkflowId": "10000",
"statusIds": [
"10000",
"10001"
],
"targetWorkflowId": "10001"
}
],
"statuses": [
{
"category": "TODO",
"id": "10000",
"name": "To Do"
}
],
"statusesPerWorkflow": [
{
"initialStatusId": "10000",
"statuses": [
"10000",
"10001"
],
"workflowId": "10000"
}
]
}
Returns a workflow scheme.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:workflow-scheme:jira
, read:application-role:jira
, read:avatar:jira
, read:group:jira
, read:issue-type:jira
...(Show more)Connect app scope required: ADMIN
integer
Requiredboolean
Returned if the request is successful.
Details about a workflow scheme.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"draft": false,
"id": 101010,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
}
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.
manage:jira-configuration
read:workflow-scheme:jira
, write:workflow-scheme:jira
, read:application-role:jira
, read:avatar:jira
, read:group:jira
...(Show more)Connect app scope required: ADMIN
integer
Requiredstring
string
object
string
boolean
Returned if the request is successful.
Details about a workflow scheme.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"issueTypeMappings": {
"10000": "scrum workflow"
},
"name": "Example workflow scheme",
"updateDraftIfNeeded": false
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"draft": false,
"id": 101010,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
}
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.
manage:jira-configuration
delete:workflow-scheme:jira
Connect app scope required: ADMIN
integer
RequiredReturned if the request is successful.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}`, {
method: 'DELETE',
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
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.
manage:jira-configuration
read:workflow-scheme:jira
, read:workflow:jira
Connect app scope required: ADMIN
integer
Requiredboolean
Returned if the request is successful.
Details about the default workflow.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}/default`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
{
"workflow": "jira"
}
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.
manage:jira-configuration
read:workflow-scheme:jira
, write:workflow-scheme:jira
, read:application-role:jira
, read:avatar:jira
, read:group:jira
...(Show more)Connect app scope required: ADMIN
integer
RequiredThe new default workflow.
boolean
string
RequiredReturned if the request is successful.
Details about a workflow scheme.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"updateDraftIfNeeded": false,
"workflow": "jira"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}/default`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"draft": false,
"id": 101010,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
}
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.
manage:jira-configuration
read:workflow-scheme:jira
, write:workflow-scheme:jira
, read:application-role:jira
, read:avatar:jira
, read:group:jira
...(Show more)Connect app scope required: ADMIN
integer
Requiredboolean
Returned if the request is successful.
Details about a workflow scheme.
1
2
3
4
5
6
7
8
9
10
11
12
13
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}/default`, {
method: 'DELETE',
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"draft": false,
"id": 101010,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
}
Returns the issue type-workflow mapping for an issue type in a workflow scheme.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:workflow-scheme:jira
, read:workflow:jira
, read:issue-type:jira
Connect app scope required: ADMIN
integer
Requiredstring
Requiredboolean
Returned if the request is successful.
Details about the mapping between an issue type and a workflow.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}/issuetype/{issueType}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
{
"issueType": "10000",
"workflow": "jira"
}
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.
manage:jira-configuration
write:workflow-scheme:jira
, read:workflow-scheme:jira
, read:workflow:jira
, read:application-role:jira
, read:avatar:jira
...(Show more)Connect app scope required: ADMIN
integer
Requiredstring
RequiredThe issue type-project mapping.
string
boolean
string
Returned if the request is successful.
Details about a workflow scheme.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"issueType": "10000",
"updateDraftIfNeeded": false,
"workflow": "jira"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}/issuetype/{issueType}`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"draft": false,
"id": 101010,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
}
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.
manage:jira-configuration
delete:workflow-scheme:jira
, read:application-role:jira
, read:avatar:jira
, read:group:jira
, read:issue-type:jira
...(Show more)Connect app scope required: ADMIN
integer
Requiredstring
Requiredboolean
Returned if the request is successful.
Details about a workflow scheme.
1
2
3
4
5
6
7
8
9
10
11
12
13
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}/issuetype/{issueType}`, {
method: 'DELETE',
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"draft": false,
"id": 101010,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
}
Returns the workflow-issue type mappings for a workflow scheme.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:workflow-scheme:jira
, read:workflow:jira
, read:issue-type:jira
Connect app scope required: ADMIN
integer
Requiredstring
boolean
Returned if the request is successful.
Details about the mapping between issue types and a workflow.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}/workflow`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
{
"defaultMapping": false,
"issueTypes": [
"10000",
"10001"
],
"workflow": "jira"
}
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.
manage:jira-configuration
write:workflow-scheme:jira
, read:workflow-scheme:jira
, read:workflow:jira
, read:application-role:jira
, read:avatar:jira
...(Show more)Connect app scope required: ADMIN
integer
Requiredstring
Requiredboolean
array<string>
boolean
string
Returned if the request is successful.
Details about a workflow scheme.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"issueTypes": [
"10000"
],
"updateDraftIfNeeded": true,
"workflow": "jira"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}/workflow?workflowName={workflowName}`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"draft": false,
"id": 101010,
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"name": "Example workflow scheme",
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
}
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.
manage:jira-configuration
delete:workflow-scheme:jira
Connect app scope required: ADMIN
integer
Requiredstring
Requiredboolean
Returned if the request is successful.
1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/workflowscheme/{id}/workflow?workflowName={workflowName}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: