Cancel Workspace Resource Task¶
POST /api/v1/workspace/resource/cancel
Overview¶
Cancel a workspace resource import or export task.
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| taskId | string | Y | Task ID Example: task_xxx Allow Empty: False |
Parameter Supplementary Notes¶
1. Interface Purpose
Cancel a workspace resource import or export task that is currently in progress.
2. Usage Instructions
You need to pass in the taskId obtained from the import/export interface.
After the cancellation request is submitted successfully, the interface will return:
Explanation: - This return indicates the task has been marked for cancellation. - The final status of the specific task can be confirmed by continuing to poll the task status interface.
3. Precautions
- Tasks that have already been completed cannot be rolled back.
- For import tasks that have been partially executed successfully, the data already written will not be automatically rolled back.
- If you need to confirm whether the cancellation has taken effect, please continue to poll the task status interface.
Request Example¶
curl 'https://openapi.truewatch.com/api/v1/workspace/resource/cancel' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"taskId":"task_xxx"}' \
--compressed