/{orgId}/admin/{itemId}/importAsyncStarts importing a new Workflow Manager configuration from the selected .wmc file. Workflow Manager configurations can be imported to items at the same or higher version as the configuration. Importing a newer configuration into an older item version is not supported.
If overwriteConfiguration is set to true, importing overwrites the target item with the contents included in the configuration file. Importing will fail if overwriteConfiguration is set to true and any jobs exist in the current item.
If overwriteConfiguration is set to false, importing merges the source configuration with the current item.
It is recommended to back up configurations before importing. The passphrase specified during export for encrypted settings must be included. If no passphrase is specified, then only encrypted keys will be imported without the value. If an invalid passphrase is specified, the import will fail. Excess scheduled tasks will be dropped based on the portal limit. The adminAdvanced privilege is required.
Mapping file properties:
| Property | Description | Data Type |
|---|---|---|
| workflowItemId | Required. The item ID for the source workflow item. | String |
| workflowItemName | Required. The name of the source workflow item. | String |
| diagrams | Optional. An array of objects mapping diagrams from the source workflow item to the target workflow item. Each object contains the diagramName, diagramId, centralizedDataReferences, and sourceGroupIds properties. diagramName (string) is the name of the diagram. diagramId (string) is the ID of the diagram. centralizedDataReferences (array) is an object for each centralized data reference in the diagram containing the following properties: centralizedDataReferenceAlias (string) is the alias name for the centralized data reference. centralizedDataReferenceId (string) is the ID for the centralized data reference. sourcePortalType (string) is the portal type for the centralized data reference. sourcePortalItemId (string) is the Portal item ID for the source centralized data reference. targetPortalItemId (string) is the Portal item ID for the target centralized data reference. Lastly, sourceGroupIds (string) is the ID of a workflow group configured on the Advanced Assignment step or used in path assignment in the diagram. | Array |
| extendedProperties | An array of objects mapping extended properties from the source workflow item to the target workflow item. Each object contains the tableName, tableId, isSurvey, sourcePortalType, sourcePortalItemId, targetPortalItemId, sourcePortalUrl, and targetPortalUrl properties. | Array |
| userDefinedSettings | Optional. An array of objects mapping the user-defined settings from the source workflow item to the target workflow item. Each object contains the settingName, isEncrypted, targetPreserveValue, sourceSettingValue, and targetSettingValue properties. settingName (string) is the name of the setting. isEncrypted (boolean) determines whether the setting is encrypted. targetPreserveValue (boolean) determines whether the setting value will be preserved in the target item. sourceSettingValue (string) is the value for the user-defined setting in the source item. targetSettingValue (string) is the value you would like to define for this setting in the target item. | Array |
| mapSettings | Optional. Maps the map settings from the source workflow item to the target workflow item. Contains two properties, lightTheme and darkTheme. The value for each property is an object, itself containing the following properties: targetPreserveValue, sourcePortalType, sourcePortalItemId,targetPortalItemId, sourcePortalUrl, and targetPortalUrl. targetPreserveValue (boolean) determines whether the map settings will be preserved in the target item. sourcePortalType (string) determines whether the portal hosting the web map is the current portal, another Enterprise, or ArcGIS Online. sourcePortalUrl (string) and targetPortalUrl (string) are only necessary if sourcePortalType is set to Other. sourcePortalItemId (string) is the item ID for the web map configured with the source item. targetPortalItemId (string) is the item ID for the web map you would like to specify for the target item. | Object |
| smtpSettings | Optional. Maps the email settings from the source workflow item to the target workflow item. Contains the following properties: targetPreserveValue, sourceServer, targetServer, sourcePort, targetPort, sourceUsername, and targetUsername. targetPreserveValue (boolean) determines whether the email settings will be preserved in the target item. sourceServer (string) is the fully-qualified domain name for the SMTP server configured with the source workflow item. targetServer (string) is the fully-qualified domain name of the SMTP server you would like to specify for the target workflow item. sourcePort (string) is the port number specified in the source workflow item's email settings. targetPort (string) is the port number you would like to specify for the target workflow item's email settings. sourceUsername (string) is the username specified in the source workflow item's email settings. targetUsername (string) is the username you would like to specify for the target workflow item's email settings. | Object |
| groups | Required. An array of objects mapping the workflow groups configured with the source workflow item to the target workflow item. Each object contains the sourceGroupId and targetGroupId properties. sourceGroupId (string) is the ID of a workflow group configured with roles in the source workflow item. targetGroupId (string) the ID for the corresponding group you would like to specify for the target workflow item. | Array |
ExtendedProperties:
| Parameter | Description | Data Type |
|---|---|---|
| tableName | Optional. The name of the extended property table. | String |
| tableId | Required. The ID of the extended property table. | String |
| isSurvey | Optional. Determines whether the table is an ArcGIS Survey123 extended property table. | Boolean |
| sourcePortalType | Optional. Specifies whether the portal hosting the extended property table is the current portal, another Enterprise portal, or ArcGIS Online. | String |
| sourcePortalItemId | Optional. The item ID of the source extended property table. | String |
| targetPortalItemId | Optional. The specified item ID for the target extended property table. Required for feature service or ArcGIS Survey123 survey extended property tables. | String |
| sourcePortalUrl | Optional. The portal URL of the source extended property table. | String |
| targetPortalUrl | Optional. The portal URL of the target extended property table. Required for feature service or ArcGIS Survey123 survey extended property tables. | String |
Example mapping file:
{
"workflowItemId": "string",
"workflowItemName": "string",
"diagrams": [
{
"diagramName": "string",
"diagramId": "string",
"centralizedDataReferences": [
{
"centralizedDataReferenceAlias": "string",
"centralizedDataReferenceId": "string",
"sourcePortalType": "string",
"sourcePortalItemId": "string",
"targetPortalItemId": "string"
}
],
"sourceGroupIds": [
"string"
]
}],
"extendedProperties": [
{
"tableName": "string",
"tableId": "string",
"isSurvey": boolean,
"sourcePortalType": "string",
"sourcePortalItemId": "string",
"targetPortalItemId": "string",
"sourcePortalUrl": "string",
"targetPortalUrl": "string"
}],
"userDefinedSettings": [
{
"settingName": "string",
"isEncrypted": boolean,
"targetPreserveValue": boolean
}
],
"mapSettings": {
"lightTheme": {
"targetPreserveValue": boolean,
"sourcePortalType": "string",
"sourcePortalItemId": "string",
"targetPortalItemId": "string",
"sourcePortalUrl": "string",
"targetPortalUrl": "string"
},
"darkTheme": {
"targetPreserveValue": boolean,
"sourcePortalType": "string",
"sourcePortalItemId": "string",
"targetPortalItemId": "string",
"sourcePortalUrl": "string",
"targetPortalUrl": "string"
}
},
"smtpSettings": {
"targetPreserveValue": boolean,
"sourceServer": "string",
"targetServer": "string",
"sourcePort": "string",
"targetPort": "string",
"sourceUsername": "string",
"targetUsername": "string"
},
"groups": [
{
"sourceGroupId": "string",
"targetGroupId": "string"
},
{
"sourceGroupId": "string",
"targetGroupId": "string"
}
]
}
Body parameters
Supported content types: multipart/form-data
| Name | Type | Required | Description |
|---|---|---|---|
token | string | ||
file | string(binary) | The configuration file to be imported into the specified item | |
mapping | string(binary) | The mapping file to be used during the import process | |
passphrase | string | ||
overwrite | boolean | Indicates whether to overwrite the current item's contents. When set to true, the current item must not have existing jobs, and its contents will be deleted and replaced by the contents of the imported configuration file. By default this setting is true. |
Path parameters
| Name | Type | Required |
|---|---|---|
org | string | |
item | string |
Response status
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | success | SuccessResponse |
| 400 | Bad Request | error | WorkflowExceptionDTO |
Examples
Request
# You can also use wget
curl -X POST /{orgId}/admin/{itemId}/importAsync \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer <YOUR_TOKEN>' \
-F token=string \
-F file=string \
-F mappingFile=string \
-F passphrase=string \
-F overwriteConfiguration=trueResponse
{
"success": true,
"message": "string",
"name": "UnableToDetermineHostingServer"
}