Controlling a workflow controlling-a-workflow
You can control a workflow directly from the REST API, through a POST request containing the workflow ID and the required execution command:
POST https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID>/commands
CAUTION
If the worfklow ID is changed in Adobe Campaign, the API request will not work anymore.
Four execution commands are available to control a workflow:
- Start
- Pause
- Resume
- Stop
For more information on the execution commands, refer to the Campaign documentation.
Sample requests
-
Start a workflow.
code language-none -X POST https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID>/commands \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Cache-Control: no-cache' \ -H 'X-Api-Key: <API_KEY>' \ -i -d '{"method":"start"}'
-
Stop a workflow.
code language-none -X POST https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID>/commands \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Cache-Control: no-cache' \ -H 'X-Api-Key: <API_KEY>' \ -i -d '{"method":"stop"}'
recommendation-more-help
3ef63344-7f3d-48f9-85ed-02bf569c4fff