I’m trying to use a new endpoint for workflow creation/validation to copy already existing workflow.
I’m trying the following, but I only get this Invalid request payload. Refer to the REST API documentation and try again., which is unclear. Could you guide me in the correct direction?
{
"payload": {
"scope": {
"type": "GLOBAL"
},
"statuses": [
{
"id": "10200",
"name": "In Review",
"description": "",
"statusCategory": "DONE",
"statusReference": "79c921a9-50ec-4695-aa3b-335a445e208e"
},
{
"id": "10202",
"name": "In QA",
"description": "",
"statusCategory": "IN_PROGRESS",
"statusReference": "63c7ecee-973b-4bd6-819d-cbabf2a59217"
},
{
"id": "10302",
"name": "Cancelled",
"description": "",
"statusCategory": "DONE",
"statusReference": "205a8104-2238-4a6b-ad67-2a77644a2cab"
},
{
"id": "10304",
"name": "Verified",
"description": "",
"statusCategory": "DONE",
"statusReference": "c0b67581-e0f9-4b8b-b603-50bc47666979"
},
{
"id": "10400",
"name": "Accepted",
"description": "",
"statusCategory": "DONE",
"statusReference": "c8fe2ed4-023a-433f-98b7-5ccbe347ee15"
},
{
"id": "10401",
"name": "Backlog",
"description": "",
"statusCategory": "TODO",
"statusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35"
},
{
"id": "10901",
"name": "Code Review",
"description": "",
"statusCategory": "IN_PROGRESS",
"statusReference": "f4f99f12-3363-437d-8585-5018fc78a7fe"
},
{
"id": "11204",
"name": "In Development",
"description": "",
"statusCategory": "IN_PROGRESS",
"statusReference": "8464c89d-32ac-406c-8719-3f6cb41905b1"
},
{
"id": "11500",
"name": "Ready for Development",
"description": "",
"statusCategory": "TODO",
"statusReference": "b5e4d548-2c24-4b9a-b775-c4528c7b064e"
},
{
"id": "12419",
"name": "Blocked",
"description": "",
"statusCategory": "TODO",
"statusReference": "a9fde54c-efc2-49ab-91e2-5a66177fb412"
},
{
"id": "12442",
"name": "Internal",
"description": "",
"statusCategory": "TODO",
"statusReference": "661c123a-514b-4f78-943a-25746b11a93a"
},
{
"id": "12456",
"name": "Ready for QA",
"description": "",
"statusCategory": "IN_PROGRESS",
"statusReference": "c8f643a7-59b6-4174-b1b0-9f331037b2e5"
}
],
"workflows": [
{
"name": "CRM TEST TD: Test DELMAR 2024-12-13 Workflow",
"description": "TEST COMPONENT CREATED FOR DEBUGGING",
"statuses": [
{
"properties": {
"issue_editable": true
},
"statusReference": "79c921a9-50ec-4695-aa3b-335a445e208e"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "63c7ecee-973b-4bd6-819d-cbabf2a59217"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "205a8104-2238-4a6b-ad67-2a77644a2cab"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "c0b67581-e0f9-4b8b-b603-50bc47666979"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "c8fe2ed4-023a-433f-98b7-5ccbe347ee15"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "f4f99f12-3363-437d-8585-5018fc78a7fe"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "8464c89d-32ac-406c-8719-3f6cb41905b1"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "b5e4d548-2c24-4b9a-b775-c4528c7b064e"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "a9fde54c-efc2-49ab-91e2-5a66177fb412"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "661c123a-514b-4f78-943a-25746b11a93a"
},
{
"properties": {
"issue_editable": true
},
"statusReference": "c8f643a7-59b6-4174-b1b0-9f331037b2e5"
}
],
"transitions": [
{
"id": 1,
"name": "Create",
"description": "",
"type": "INITIAL",
"properties": {
"issue_editable": true
},
"toStatusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35",
"links": [],
"actions": [
{
"ruleKey": "CopyValueFromOtherFieldPostFunction",
"parameters": {
"destinationFieldId": "description",
"sourceFieldId": "customfield_12807",
"copyType": "same"
}
}
],
"validators": [
{
"ruleKey": "PermissionValidator",
"parameters": {
"permissionKey": "CREATE_ISSUES"
}
}
]
},
{
"id": 221,
"name": "Ready for Development",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "b5e4d548-2c24-4b9a-b775-c4528c7b064e",
"links": [
{
"fromStatusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35"
}
],
"actions": [],
"validators": []
},
{
"id": 231,
"name": "In Development",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "8464c89d-32ac-406c-8719-3f6cb41905b1",
"links": [
{
"fromStatusReference": "b5e4d548-2c24-4b9a-b775-c4528c7b064e"
}
],
"actions": [
{
"ruleKey": "CopyValueFromOtherFieldPostFunction",
"parameters": {
"destinationFieldId": "customfield_11800",
"sourceFieldId": "assignee",
"copyType": "same"
}
}
],
"validators": [
{
"ruleKey": "FieldRequiredValidator",
"parameters": {
"ignoreContext": false,
"fields": [
"customfield_12100"
],
"errorMessage": "Please enter estimate to the 'Development Estimate' field"
}
}
]
},
{
"id": 241,
"name": "Back to Backlog",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35",
"links": [
{
"fromStatusReference": "b5e4d548-2c24-4b9a-b775-c4528c7b064e"
}
],
"actions": [],
"validators": []
},
{
"id": 251,
"name": "QA Passed",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "79c921a9-50ec-4695-aa3b-335a445e208e",
"links": [
{
"fromStatusReference": "63c7ecee-973b-4bd6-819d-cbabf2a59217"
}
],
"actions": [],
"validators": []
},
{
"id": 261,
"name": "Verified",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "c0b67581-e0f9-4b8b-b603-50bc47666979",
"links": [
{
"fromStatusReference": "79c921a9-50ec-4695-aa3b-335a445e208e"
}
],
"actions": [
{
"ruleKey": "UpdateIssueFieldFunction",
"parameters": {
"fieldId": "resolution",
"fieldValue": "10000"
}
}
],
"validators": []
},
{
"id": 301,
"name": "Cancel",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "205a8104-2238-4a6b-ad67-2a77644a2cab",
"links": [
{
"fromStatusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35"
},
{
"fromStatusReference": "b5e4d548-2c24-4b9a-b775-c4528c7b064e"
}
],
"actions": [
{
"ruleKey": "UpdateIssueFieldFunction",
"parameters": {
"fieldId": "resolution",
"fieldValue": "10300"
}
}
],
"validators": []
},
{
"id": 311,
"name": "Ready for Code Review",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "f4f99f12-3363-437d-8585-5018fc78a7fe",
"links": [
{
"fromStatusReference": "8464c89d-32ac-406c-8719-3f6cb41905b1"
}
],
"actions": [],
"validators": []
},
{
"id": 321,
"name": "Ready for QA",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "c8f643a7-59b6-4174-b1b0-9f331037b2e5",
"links": [
{
"fromStatusReference": "f4f99f12-3363-437d-8585-5018fc78a7fe"
}
],
"actions": [
{
"ruleKey": "UpdateIssueFieldFunction",
"parameters": {
"fieldId": "assignee",
"fieldValue": ""
}
}
],
"validators": []
},
{
"id": 361,
"name": "Reopen",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "b5e4d548-2c24-4b9a-b775-c4528c7b064e",
"links": [
{
"fromStatusReference": "63c7ecee-973b-4bd6-819d-cbabf2a59217"
},
{
"fromStatusReference": "c0b67581-e0f9-4b8b-b603-50bc47666979"
},
{
"fromStatusReference": "f4f99f12-3363-437d-8585-5018fc78a7fe"
},
{
"fromStatusReference": "c8f643a7-59b6-4174-b1b0-9f331037b2e5"
},
{
"fromStatusReference": "79c921a9-50ec-4695-aa3b-335a445e208e"
}
],
"actions": [
{
"ruleKey": "UpdateIssueFieldFunction",
"parameters": {
"fieldId": "resolution",
"fieldValue": ""
}
},
{
"ruleKey": "CopyValueFromOtherFieldPostFunction",
"parameters": {
"destinationFieldId": "assignee",
"sourceFieldId": "customfield_11800",
"copyType": "same"
}
}
],
"validators": []
},
{
"id": 371,
"name": "Completed",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "c8fe2ed4-023a-433f-98b7-5ccbe347ee15",
"links": [
{
"fromStatusReference": "c0b67581-e0f9-4b8b-b603-50bc47666979"
}
],
"actions": [
{
"ruleKey": "UpdateIssueFieldFunction",
"parameters": {
"fieldId": "resolution",
"fieldValue": "10100"
}
}
],
"validators": []
},
{
"id": 391,
"name": "In QA",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "63c7ecee-973b-4bd6-819d-cbabf2a59217",
"links": [
{
"fromStatusReference": "c8f643a7-59b6-4174-b1b0-9f331037b2e5"
}
],
"actions": [],
"validators": []
},
{
"id": 411,
"name": "Completed",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "c8fe2ed4-023a-433f-98b7-5ccbe347ee15",
"links": [
{
"fromStatusReference": "661c123a-514b-4f78-943a-25746b11a93a"
}
],
"actions": [],
"validators": []
},
{
"id": 421,
"name": "Stop Development",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "b5e4d548-2c24-4b9a-b775-c4528c7b064e",
"links": [
{
"fromStatusReference": "8464c89d-32ac-406c-8719-3f6cb41905b1"
}
],
"actions": [],
"validators": []
},
{
"id": 431,
"name": "To Backlog",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35",
"links": [
{
"fromStatusReference": "661c123a-514b-4f78-943a-25746b11a93a"
}
],
"actions": [],
"validators": []
},
{
"id": 441,
"name": "Internal",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "661c123a-514b-4f78-943a-25746b11a93a",
"links": [
{
"fromStatusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35"
}
],
"actions": [],
"validators": []
},
{
"id": 451,
"name": "Blocked",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "a9fde54c-efc2-49ab-91e2-5a66177fb412",
"links": [
{
"fromStatusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35"
}
],
"actions": [],
"validators": []
},
{
"id": 461,
"name": "Backlog",
"description": "",
"type": "DIRECTED",
"properties": {
"issue_editable": true
},
"toStatusReference": "6d2e6e3c-d00e-4291-8069-9bdda68fea35",
"links": [
{
"fromStatusReference": "a9fde54c-efc2-49ab-91e2-5a66177fb412"
}
],
"actions": [],
"validators": []
}
]
}
]
},
"validationOptions": {
"levels": [
"ERROR",
"WARNING"
]
}
}