Workflows
To use the Unstructured Platform API to manage workflows, do the following:
- To get a list of available workflows, use the
GET
method to call the/workflows
endpoint. Learn more. - To get information about a workflow, use the
GET
method to call the/workflows/<workflow-id>
endpoint. Learn more. - To create a workflow, use the
POST
method to call the/workflows
endpoint. Learn more. - To run a workflow manually, use the
POST
method to call the/workflows/<workflow-id>/run
endpoint. Learn more. - To update a workflow, use the
PUT
method to call the/workflows/<workflow-id>
endpoint. Learn more. - To delete a workflow, use the
DELETE
method to call the/workflows/<workflow-id>
endpoint. Learn more.
The following examples assume that you have already met the requirements and understand the basics of working with the Unstructured Platform API.
Create a workflow
To create a workflow, use the POST
method to call the /workflows
endpoint. In the request body,
specify the settings for the workflow, as follows:
Replace the preceding placeholders as follows:
-
<name>
(required) - A unique name for this workflow. -
<source-connector-id>
(required) - The ID of the target source connector. To get the ID, use theGET
method to call the/sources
endpoint. Learn more. -
<destination-connector-id>
(required) - The ID of the target destination connector. To get the ID, use theGET
method to call the/destinations
endpoint. Learn more. -
<type>
(required) - The workflow optimization type. Available values includeadvanced
,basic
, andplatinum
. -
<cron-expression>
- The repeating automatic run schedule, specified as a cron expression, for example59 11 * * 4
to run the workflow at 11:59 PM every Thursday. Get help building cron expressions. Learn more.If
schedule
is not specified or ifcrontab_entries
is empty, the workflow does not automatically run on a repeating schedule.
Update a workflow
To update information about a workflow, use the PUT
method to call the /workflows/<workflow-id>
endpoint, replacing
<workflow-id>
with the workflow’s unique ID. To get this ID, see List workflows.
In the request body, specify the settings for the workflow. For the specific settings to include, see Create a workflow.