Delete task¶
Delete an import task record.
POST $CLOUDSIGMA_API_BASE/task/delete
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
Deleting a task will not roll back data that has been written to the target; confirm that the task is no longer needed before deleting it.
Set the operation-specific values used in the request:
$TASK_ID: Task ID to be deleted.
Request¶
curl -X POST "$CLOUDSIGMA_API_BASE/task/delete" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d "{\"task_id\":\"$TASK_ID\"}"
Request body
Field |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The ID of the import task to delete. |
Successful response¶
Returns 200 on success and data is null.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
This interface does not return deleted tasks. |
Error response¶
{
"code": "ErrForbidden",
"msg": "permission denied",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The request body is invalid. |
Fix JSON and |
|
|
The caller does not have permission to delete the task. |
Check workspace and object authorization. |
|
|
The service is temporarily unable to complete the authorization check. |
Try again later. |
|
|
The service failed to delete the task. |
Check both HTTP status and |
Follow-up operations¶
Query task list to confirm that the task no longer appears.