createDiagram

Click to copy

Create a new workflow diagram

Create a workflow diagram. Diagrams can be saved in active or non-active (draft) mode. A diagram cannot be used to create jobs if the diagram is not active. A diagram will be validated when activated. The adminBasic or adminAdvanced privilege is required to create a workflow diagram.

Validation rules include:

  • The diagram only has one initial step.
  • The diagram cannot have orphan steps.

WorkflowDiagram Parameters:

ParameterDescriptionData Type
diagramIdOptional. The unique ID of the diagram to be created.String
diagramNameRequired. The name of the diagram to be created.String
descriptionOptional. The description of the diagram to be created.String
activeOptional. If it is not defined, it is set to false.Boolean
stepsRequired. The step(s) in the diagram to be created. See details for Step.Array[Step]
annotationsOptional. The annotations of the diagram to be created. See details for Annotation.Array[Annotation]
displayGridRequired. If true, the grid is displayed in the diagram to be created.Boolean
dataSourcesOptional. Spatial data that will be used in the steps of the diagram. See details for DataSources. Note: Data sources are not supported in ArcGIS Online.Array[DataSources]

Step:

ParameterDescriptionData Type
idRequired. Step ID in the diagram to be created.String
nameRequired. Step name in the diagram to be created.String
descriptionOptional. Step description in the diagram to be created.String
stepTemplateIdOptional. Step template being used for the step.String
automaticRequired. If true, the step is run automatically.Boolean
canCommentOptional. If true, the user can add comments to the job.Boolean
commentRequiredOptional. If true, the user cannot proceed without adding a comment.Boolean
proceedNextRequired. If true, the diagram is proceeded to next step automatically.Boolean
canSkipRequired. If true, the step can be skipped.Boolean
positionRequired. The graphical position of the step.String
shapeRequired. The graphical shape of the step.Number
colorOptional. The color of the step displayed in the diagram.String
outlineColorOptional. The outline color of the step.String
labelColorOptional. The color of the step label.String
actionRequired. The step action including definition of actionType and args.String
pathsRequired. The step paths to define next step and assignment. See details for StepPathArray[StepPath]
helpUrlOptional. The URL to open step help. This property is deprecated. Use helpLink instead.String
helpTextOptional. The help message configured with the step.String
helpLinkOptional. The help link configured with the step.String
encodeHelpLinkOptional. If true, the step help link will be encoded.Boolean
scheduleOptional. If defined, the step is run on a schedule. See details for Schedule.Object

StepPath:

ParameterDescriptionData Type
nextStepRequired. The next step ID.String
expressionOptional. The condition to determine next step if the current step has more than one next step.String
labelOptional. The label for the next step.String
assignedToOptional. The assignment for next step.String
assignedTypeOptional. The assignment type for next step. Allowed values are Unassigned, User, and Group. Unassigned must be set if assignedTo is empty.String
pointsRequired. The position of path to connect the current step to next step.Array[Point]
portsRequired. The port position of path to connect the current step to next step.Array[String]
statusOptional. The status of the next step.String
notificationsOptional. The notification sent when reaching next step.Array[String]
lineColorOptional. The line color of the path.String
labelColorOptional. The label color of the path.String

Schedule:

ParameterDescriptionData Type
scheduleTypeOptional. The schedule type for the step. Allowed values are Duration, SpecificTime, and Expression.String
timeDurationRequired if the scheduleType is Duration. The time duration before running the step. See details for TimeDuration.Object
specificTimeRequired if the scheduleType is SpecificTime. The specific time to run the step. See details for SpecificTime.Object
expressionRequired if the scheduleType is Expression. The arcade expression defined for the specific time to run the step.String

TimeDuration:

ParameterDescriptionData Type
monthsOptional. The number of months until running the step.Integer
daysOptional. The number of days until running the step.Integer
hoursOptional. The number of hours until running the step.Integer
minutesOptional. The number of minutess until running the step.Integer
offsetOptional. The buffer offset of the number of minutes allowed to run the step based on scheduled time.Integer

SpecificTime:

ParameterDescriptionData Type
typeOptional. The type of the specificTime to run the step. Allowed values are HourOfDay, DayOfWeek, DayOfMonth, and MonthOfYear.String
dayOfWeekOptional. Which day of the week to run the step. 1 - Monday to 7 - SundayInteger
dayOfMonthOptional. Which day of the month to run the step.Integer
monthOptional. The month to run the step. 1 - January to 12 - DecemberInteger
hourOptional. The hour to run the step. Allowed values are the integer between 1 and 23Integer
minuteOptional. The minute to run the step. Allowed values are the integer between 0 and 59Integer
offsetOptional. The buffer offset of the number of minutes allowed to run the step based on scheduled time.Integer

DataSources:

ParameterDescriptionData Type
nameRequired. The unique name of the data source to be stored in the diagram.String
urlRequired. The url of the data source such as the portal item url for a feature service.String
sourceTypeRequired. The type of data source such as branch versioned feature service.String

Annotation:

ParameterDescriptionData Type
positionRequired. Annotation position.String
colorOptional. Annotation text color.String
outlineColorOptional. The Outline color of the annotation.String
labelColorOptional. The label color of the annotation.String
textRequired. Annotation text.String

Body parameter

Use dark colors for code blocksCopy
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
87
88
89
90
91
92
93
94
95
{
  "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": [
            {
              "x": 0,
              "y": 0
            }
          ],
          "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": "HourOfDay",
          "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

NameTypeRequired

token

string

Path parameters

NameTypeRequired

orgId

string

itemId

string

Examples

Request

Use dark colors for code blocksCopy
1
2
3
4
5
# You can also use wget
curl -X POST /{orgId}/{itemId}/diagrams \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Response

200 Response

Use dark colors for code blocksCopy
1
2
3
{
  "diagramId": "string"
}
StatusMeaningDescriptionSchema

200

OK

success

Inline

400

Bad Request

invalid diagram

WorkflowJsonExceptionDTO

Response details

Status Code 200

CreateDiagramResponse

NameTypeRequired

diagramId

string

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.