Delete task¶
Delete an export task.
POST https://moi.matrixorigin.cn/newmoi/export/task/delete
Preparation before calling¶
First Query task details to confirm the export task to be deleted. Prepare a personal access token with access to the target workspace, the target workspace ID, and the export task ID.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.$TASK_ID: ID of the export task to be deleted, fill in theidfield of the request body.
Deletion of the currently created page is disabled while the task is running. Deleting a task does not roll back data that has been exported to the target system.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/export/task/delete" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": "'$TASK_ID'"
}'
Request body¶
Field |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The ID of the export task to be deleted. |
Successful response¶
Returns 200 on success. data is null, indicating that the deletion request has been completed; the data that has been exported to the target system will not be rolled back.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
Success message with value |
|
null |
Deleting the interface does not return the task object. |
Error response¶
Business failure may be returned with HTTP 200 and code other than OK.
{
"code": "ErrServer",
"msg": "Internal server error",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
— |
The request body cannot be parsed; this compatibility path returns the |
Submit a JSON object containing a non-empty |
|
|
The task does not exist, or the deletion process failed. |
First query the task details to confirm the ID; when the task is running, please wait for the page to allow deletion. |
|
|
The current identity does not have the permission to delete this task. |
Request permission to delete the export task. |
|
|
Authorization service is temporarily unavailable. |
Try again later. |
Follow-up operations¶
Query task list to confirm that the task no longer appears.