控管工作流程 controlling-a-workflow
您可以透過包含工作流程ID和所需執行命令的POST請求,直接從REST API控制工作流程:
POST https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID>/commands
CAUTION
如果工作流程ID在Adobe Campaign中變更,API請求將無法再運作。
有四個執行命令可用於控制工作流程:
- 開始
- 暫停
- 繼續
- 停止
如需執行命令的詳細資訊,請參閱Campaign檔案。
範例要求
-
啟動工作流程。
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"}'
-
停止工作流程。
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