Workflow

Use this resource to request the details of a linear taskflow or the details of all linear taskflows in the organization. You can also create, update, or delete a linear taskflow.

GET Request

To request the details of a particular linear taskflow, include the linear taskflow ID or linear taskflow name in the URI. Use one of the following URIs:

/api/v2/workflow/<id>
/api/v2/workflow/name/<name>

If you use the linear taskflow name in the URI and the linear taskflow name includes a space, replace the space with %20. For example:

/api/v2/workflow/name/my%20linear%20taskflow

To request the details of all linear taskflows in the organization, use the following URI:

/api/v2/workflow

Optionally, you can receive the response in simple mode which significantly improves performance. When you enable simple mode, the response does not include the ScheduleId attribute and the email attributes. To receive the response in simple mode, include simpleMode=true in the request. Use the following URI to receive details of all linear taskflows using simple mode:

/api/v2/workflow/?simpleMode=true

GET Response

If successful, returns the workflow object for the requested linear taskflow. Or, if you request the details for all linear taskflows in the organization, returns a workflow object for each linear taskflow in the organization.
Returns an error object if errors occurred.
The workflow object includes the following attributes:

FieldTypeDescription
idLinear taskflow ID.
orgIdOrganization ID.
nameLinear taskflow name.
descriptionDescription.
createTimeTime the linear taskflow was created
updateTimeLast time the linear taskflow was updated.
createdByUser who created the linear taskflow.
updatedByUser who last updated the linear taskflow.
errorTaskEmailObject that includes the taskEmail object for error notifications.
idIncluded in taskEmail object for errorTaskEmail.
ID.
emailsIncluded in taskEmail object for errorTaskEmail.
Email address that receives email notification when a task fails to complete.
successTaskEmailObject that includes the taskEmail object for success notifications.
idIncluded in taskEmail object for successTaskEmail.
ID.
emailsIncluded in taskEmail object for successTaskEmail.
Email address that receives email notification when a task completes successfully
warningTaskEmailObject that includes the taskEmail object for warning notifications.
idIncluded in taskEmail object for warningTaskEmail.
ID
emailsIncluded in taskEmail object for warningTaskEmail.
Email address that receives email notification when a task completes with errors.
agentIdAgent that runs the task.
runtimeEnvironmentIdRuntime environment used for the task
scheduleIdSchedule associated with the linear taskflow, if any.
preProcessingCmdCommand to run before the task.
postProcessingCmdCommand to run after the task completes.
tasksDefines each task associated with the linear taskflow. Includes a workflowTask object for each task.
taskIdIncluded in the workflowTask object.
Task ID.
typeIncluded in the workflowTask object.
Workflow task type. Returns one of the following codes:
DMASK. Masking task.
DRS. Replication task.
DSS. Synchronization task.
MTT. Mapping task.
PCS. PowerCenter task
nameIncluded in the workflowTask object.
Task name.
stopOnErrorIncluded in the workflowTask object.
Stops the linear taskflow if a task fails to complete
stopOnWarningIncluded in the workflowTask object.
Stops the linear taskflow if a task completes with warnings

POST Request

To update a linear taskflow, use the following URI:

/api/v2/workflow/<id>

To create a linear taskflow, omit the optional linear taskflow ID.
When you update a linear taskflow, Data Integration replaces the existing linear taskflow with the update.
You can submit a partial update using partial mode. If you want to update a field in the workflowTask object using partial mode, you must include the taskId field. To submit a request using partial mode, use a JSON request and include the following line in the header:

Update-Mode=PARTIAL

With this URI, you can use the following attributes in the workflow object:

FieldTypeRequiredDescription
errorTaskEmailObject that includes the taskEmail object for error notifications.
idInclude in taskEmail object for errorTaskEmail.
ID.
emailsInclude in taskEmail object for errorTaskEmail.
Email address that receives email notification when a task fails to complete.
successTaskEmailObject that includes the taskEmail object for success notifications.
idInclude in taskEmail object for successTaskEmail.
ID.
emailsInclude in taskEmail object for successTaskEmail.
Email address that receives email notification when a task completes successfully
warningTaskEmailObject that includes the taskEmail object for warning notifications.
idInclude in taskEmail object for warningTaskEmail.
ID.
emailsInclude in taskEmail object for warningTaskEmail.
Email address that receives email notification when a task completes with errors.
nameName of the linear taskflow.
descriptionDescription of the linear taskflow.
tasksUse a workflowTask object to define the following attributes for each task you want to include in the linear taskflow.
taskIdInclude in the workflowTask object.
Task ID.
Include in the workflowTask object.
Workflow task type. Use one of the following codes:
DMASK. Masking task.
DRS. Replication task.
DSS. Synchronization task.
MTT. Mapping task.
PCS. PowerCenter task.
nameInclude in the workflowTask object.
Name of the task
stopOnErrorInclude in the workflowTask object.
Stops the linear taskflow if the task fails to complete. Use one of the following options:
1. True. Stop on error.
2. False. Do not stop on error.
stopOnWarningInclude in the workflowTask object.
Stops the linear taskflow if a task completes with warnings. Use one of the following options:
1. True. Stop on error.
2. False. Do not stop on error.
scheduleIdSchedule for the linear taskflow.

POST Response

If successful, returns the workflow response object for the linear taskflow that you created or updated.
Returns the error object if errors occur.

DELETE Request

To delete a linear taskflow, use the linear taskflow ID in the following URI:

/api/v2/workflow/<id>

DELETE Response

Returns the 200 response code if the request is successful.
Returns the error object if errors occur

POST Example

To update an existing linear taskflow with an ID of 0000342J0000K, you might use the following request:

POST <serverUrl>/api/v2/workflow/0000342J0000K 
Content-Type: application/json
Accept: application/json
icSessionId: <icSessionId>

{
"@type": "workflow",
"name": "linear taskflow",
"tasks":[{ 
"@type":"workflowTask",
"taskId":"0000100I00000000001G",
"type":"DSS",
"name":"DSS_DQ5",
"stopOnError":"false"
},{
"@type":"workflowTask",
"taskId":"0000100Z0000000000B8",
"type":"MTT",
"name":"CIT_SimpleTemplate2",
"stopOnError":"false"
},{
"@type":"workflowTask",
"taskId":"0000100G000000000002",
"type":"DRS",
"name":"SF2File",
"stopOnError":"false"
}]
}

A successful request returns the workflow object that you updated.