curl --location --request PUT 'http://jira.local:8080/jira/rest//rest/api/3/workflowscheme//draft' \
--header 'Content-Type: application/json' \
--data-raw '{
"defaultWorkflow": "jira",
"description": "The description of the example workflow scheme.",
"issueTypeMappings": {
"10000": "scrum workflow"
},
"name": "Example workflow scheme",
"updateDraftIfNeeded": false
}'
{"id":17218781,"name":"Example workflow scheme","description":"The description of the example workflow scheme.","defaultWorkflow":"scrum workflow","issueTypeMappings":{"10000":"jira","10001":"jira"},"originalDefaultWorkflow":"jira","originalIssueTypeMappings":{"10001":"builds workflow"},"draft":true,"lastModifiedUser":{"self":"https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g","key":"","accountId":"5b10a2844c20165700ede21g","accountType":"atlassian","name":"","emailAddress":"mia@example.com","avatarUrls":{"48x48":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48","24x24":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24","16x16":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16","32x32":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32"},"displayName":"Mia Krystof","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[]},"applicationRoles":{"size":1,"items":[]}},"lastModified":"Today 6:38 PM","self":"https://your-domain.atlassian.net/rest/api/3/workflowscheme/17218781/draft"}
defaultWorkflow
is not specified when creating a workflow scheme, it is set to Jira Workflow (jira).updateDraftIfNeeded
set to true
: If a draft workflow scheme exists, it is updated. Otherwise, a draft workflow scheme is created.updateDraftIfNeeded
set to false
: An error is returned, as active workflow schemes cannot be updated.updateDraftIfNeeded
set to true
: The workflow scheme is updated, as inactive workflow schemes do not require drafts to update.false
.defaultWorkflow
is not specified when creating a workflow scheme, it is set to Jira Workflow (jira).updateDraftIfNeeded
set to true
: If a draft workflow scheme exists, it is updated. Otherwise, a draft workflow scheme is created.updateDraftIfNeeded
set to false
: An error is returned, as active workflow schemes cannot be updated.updateDraftIfNeeded
set to true
: The workflow scheme is updated, as inactive workflow schemes do not require drafts to update.false
.