Update an existing diagram
Update a diagram by diagramId. Once the diagram is updated, a new diagram version is automatically created. If the diagram version is not activated on update, it will be saved as a draft with a version number of -1
.
A draft version can be activated by updating the active
parameter from false
to true
on the diagram. Once activated the existing draft version can be deleted by using the delete
parameter. To keep a draft version set delete
parameter to false
. By default the delete
parameter is set to true
. The updates in the diagram will be saved only if it passes the validation. The adminBasic or adminAdvanced privilege is required to update a diagram.
WorkflowDiagram Parameters:
Parameter | Description | Data Type |
---|---|---|
deleteDraft | Optional. If false, the draft diagram version will not be deleted when a diagram is activated. | Boolean |
diagram | Required. Parameters for the diagram to be updated. For parameter details, see Create a new workflow diagram | String |
Body parameter
{
"deleteDraft": true,
"diagram": {
"diagramId": "string",
"diagramName": "string",
"description": "string",
"active": true,
"initialStepId": "string",
"initialStepName": "string",
"steps": [
{
"id": "string",
"name": "string",
"description": "string",
"stepTemplateId": "string",
"automatic": true,
"proceedNext": true,
"canSkip": true,
"position": "string",
"shape": 0,
"color": "string",
"outlineColor": "string",
"labelColor": "string",
"action": {
"actionType": "string",
"args": {}
},
"paths": [
{
"nextStep": "string",
"expression": "string",
"label": "string",
"assignedTo": "string",
"points": [
{}
],
"ports": [
"string"
],
"assignedType": "Unassigned",
"status": "string",
"notifications": [
"string"
],
"lineColor": "string",
"labelColor": "string",
"isAssignedToCustomExpression": true,
"forceGroupAssignment": true
}
],
"helpUrl": "string",
"helpText": "string",
"helpLink": "string",
"encodeHelpLink": true,
"schedule": {
"scheduleType": "Duration",
"timeDuration": {
"months": 0,
"days": 0,
"hours": 0,
"minutes": 0,
"offset": 0
},
"specificTime": {
"type": "[",
"dayOfWeek": 0,
"dayOfMonth": 0,
"month": 0,
"hour": 0,
"minutes": 0,
"offset": 0
},
"expression": "string"
}
}
],
"dataSources": [
{
"name": "string",
"url": "string",
"sourceType": "string"
}
],
"annotations": [
{
"position": "string",
"color": "string",
"outlineColor": "string",
"labelColor": "string",
"text": "string"
}
],
"displayGrid": true
}
}
Query parameters
Name | Type | Required |
---|---|---|
|
|
Path parameters
Name | Type | Required |
---|---|---|
|
| |
|
| |
|
|
Examples
Request
# You can also use wget
curl -X POST /{orgId}/{itemId}/diagrams/{diagramId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Response
200 Response
{
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
| success | ||
| invalid diagram |