/{orgId}/{itemId}/diagrams
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:
Parameter | Description | Data Type |
---|---|---|
diagramId | Optional. The unique ID of the diagram to be created. | String |
diagramName | Required. The name of the diagram to be created. | String |
description | Optional. The description of the diagram to be created. | String |
active | Optional. If it is not defined, it is set to false. | Boolean |
steps | Required. The step(s) in the diagram to be created. See details for Step. | Array[Step] |
annotations | Optional. The annotations of the diagram to be created. See details for Annotation. | Array[Annotation] |
displayGrid | Required. If true, the grid is displayed in the diagram to be created. | Boolean |
dataSources | Optional. Spatial data that will be used in the steps of the diagram. See details for DataSources. **Note: It is recommended to use centralizedDataReferences for new diagrams. Data sources are not supported in ArcGIS Online. ** | Array[DataSources] |
centralizedDataReferences | Required. Centralized reference to data and other content that will be used in the steps of the diagram. See details for CentralizedDataReferences. | Array[CentralizedDataReferences] |
useCentralizedDataReferences | Optional. Indicates that the diagram's step configurations make use of CentralizedDataReferences. Defaults to false. Note: This is recommended for new diagrams. | Boolean |
Step:
Parameter | Description | Data Type |
---|---|---|
id | Required. Step ID in the diagram to be created. | String |
name | Required. Step name in the diagram to be created. | String |
description | Optional. Step description in the diagram to be created. | String |
stepTemplateId | Optional. Step template being used for the step. | String |
automatic | Required. If true, the step is run automatically. | Boolean |
canComment | Optional. If true, the user can add comments to the job. | Boolean |
commentRequired | Optional. If true, the user cannot proceed without adding a comment. | Boolean |
proceedNext | Required. If true, the diagram is proceeded to next step automatically. | Boolean |
canSkip | Required. If true, the step can be skipped. | Boolean |
position | Required. The graphical position of the step. | String |
shape | Required. The graphical shape of the step. | Number |
color | Optional. The color of the step displayed in the diagram. | String |
outlineColor | Optional. The outline color of the step. | String |
labelColor | Optional. The color of the step label. | String |
action | Required. The step action including definition of actionType and args. | String |
paths | Required. The step paths to define next step and assignment. See details for StepPath | Array[StepPath] |
helpUrl | Optional. The URL to open step help. Starting at 11.3, this property is deprecated. Use help instead. | String |
helpText | Optional. The help message configured with the step. | String |
helpLink | Optional. The help link configured with the step. Introduced at ArcGIS Enterprise 11.3. | String |
encodeHelpLink | Optional. If true, the step help link will be encoded. | Boolean |
schedule | Optional. If defined, the step is run on a schedule. See details for Schedule. | Object |
StepPath:
Parameter | Description | Data Type |
---|---|---|
nextStep | Required. The next step ID. | String |
expression | Optional. The condition to determine next step if the current step has more than one next step. | String |
label | Optional. The label for the next step. | String |
assignedTo | Optional. The assignment for next step. | String |
assignedType | Optional. The assignment type for next step. Allowed values are Unassigned, User, and Group. Unassigned must be set if assignedTo is empty. | String |
points | Required. The position of path to connect the current step to next step. | Array[Point] |
ports | Required. The port position of path to connect the current step to next step. | Array[String] |
status | Optional. The status of the next step. | String |
notifications | Optional. The notification sent when reaching next step. | Array[String] |
lineColor | Optional. The line color of the path. | String |
labelColor | Optional. The label color of the path. | String |
Schedule:
Parameter | Description | Data Type |
---|---|---|
scheduleType | Optional. The schedule type for the step. Allowed values are Duration, SpecificTime, and Expression. | String |
timeDuration | Required if the scheduleType is Duration. The time duration before running the step. See details for TimeDuration. | Object |
specificTime | Required if the scheduleType is SpecificTime. The specific time to run the step. See details for SpecificTime. | Object |
expression | Required if the scheduleType is Expression. The arcade expression defined for the specific time to run the step. | String |
TimeDuration:
Parameter | Description | Data Type |
---|---|---|
months | Optional. The number of months until running the step. | Integer |
days | Optional. The number of days until running the step. | Integer |
hours | Optional. The number of hours until running the step. | Integer |
minutes | Optional. The number of minutess until running the step. | Integer |
offset | Optional. The buffer offset of the number of minutes allowed to run the step based on scheduled time. | Integer |
SpecificTime:
Parameter | Description | Data Type |
---|---|---|
type | Optional. The type of the specificTime to run the step. Allowed values are HourOfDay, DayOfWeek, DayOfMonth, and MonthOfYear. | String |
dayOfWeek | Optional. Which day of the week to run the step. 1 - Monday to 7 - Sunday | Integer |
dayOfMonth | Optional. Which day of the month to run the step. | Integer |
month | Optional. The month to run the step. 1 - January to 12 - December | Integer |
hour | Optional. The hour to run the step. Allowed values are the integer between 1 and 23 | Integer |
minute | Optional. The minute to run the step. Allowed values are the integer between 0 and 59 | Integer |
offset | Optional. The buffer offset of the number of minutes allowed to run the step based on scheduled time. | Integer |
DataSources:
Parameter | Description | Data Type |
---|---|---|
name | Required. The unique name of the data source to be stored in the diagram. | String |
url | Required. The url of the data source such as the portal item url for a feature service. | String |
sourceType | Required. The type of data source such as branch versioned feature service. | String |
Annotation:
Parameter | Description | Data Type |
---|---|---|
position | Required. Annotation position. | String |
color | Optional. Annotation text color. | String |
outlineColor | Optional. The Outline color of the annotation. | String |
labelColor | Optional. The label color of the annotation. | String |
text | Required. Annotation text. | String |
CentralizedDataReferences:
Parameter | Description | Data Type |
---|---|---|
id | Required. The unique identifier of the data reference to be stored in the diagram. | String |
alias | Required. The unique name of the data reference to be stored in the diagram. | String |
isValidated | Required. Indicates whether the data reference has been validated. Note: Pro Items and Pro Commands are not validated. | Boolean |
referenceType | Required. The type of data reference. Accepted values include, FeatureService, Survey, GeoprocessingService, WebMap, ProProject, ProMapItem, ProSceneItem, ProTaskItem, ProLayoutItem, ProSystemToolboxItem, or ProCommand. Note: Geoprocessing services must use either standaloneGPUrl or portalItem. | String |
capabilities | Optional. The capabilities of a branch versioned feature service. Valid values include SupportsBranchVersioning, SupportsCreateReplica, and SupportsDataQuality. | Array[String] |
portalItem | Optional. The item information for the reference. Required for referencesTypes set to FeatureService, Survey, WebMap, or ProProject. For more details, see PortalItem. | Object[PortalItem] |
proItemName | Optional. The name of the Pro item. Required when the referenceType is set to ProMapItem, ProSceneItem, ProTaskItem, ProLayoutItem, or ProSystemToolboxItem | String |
command | Optional. The Pro command DAML id. Required when the referenceType is ProCommand. | String |
standaloneGPUrl | Optional. The service URL for the Geoprocessing Service. Required when the referenceType is GeoprocessingService and portalItem is not defined. | String |
PortalItem:
Parameter | Description | Data Type |
---|---|---|
itemId | Required. The unique item identifier of the Portal item. | String |
portalType | Optional. The hosting Portal location of the data reference relative to the workflow item. Accepted values include Current, ArcGIS Online, and Other. This value is set to Current by default. | String |
portalUrl | Optional. Required when portalType is set to Other, the full URL including Web Adaptor for the Portal hosting the item. | String |
Query parameters
Name | Type | Required |
---|---|---|
|
|
Body parameters
Supported content types: application/json
Name | Type | Required | Description |
---|---|---|---|
a diagram object defining the diagram |
Path parameters
Name | Type | Required |
---|---|---|
|
| |
|
|
Examples
Request
# 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}' \
--data '{"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"}],"centralizedDataReferences":[{}],"annotations":[{"position":"string","color":"string","outlineColor":"string","labelColor":"string","text":"string"}],"displayGrid":true,"useCentralizedDataReferences":true}'
Response
Status | Meaning | Description | Schema |
---|---|---|---|
| success | Inline | |
| invalid diagram |
Response details
Status Code 200
CreateDiagramResponse
Name | Type | Required |
---|---|---|
|
|