Rerun the task¶
Rerun the file specified in the export task.
POST https://moi.matrixorigin.cn/newmoi/export/task/$TASK_ID/rerun
Preparation before calling¶
First Query export files to confirm the export tasks and failed files to be retried. 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: The export task ID to be retried, fill in the task ID position in the request address.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/export/task/$TASK_ID/rerun" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"files": [
"export-file_01"
]
}'
Retry all failed files:
curl -X POST "https://moi.matrixorigin.cn/newmoi/export/task/$TASK_ID/rerun" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
}'
Path parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The ID of the export task to rerun. |
Request body¶
Field |
Type |
Is it required |
Description |
|---|---|---|---|
|
string[] |
No |
Specifies the export record ID to be re-run; if no or an empty array is passed, all files with failed status in the task will be retried. |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Successful response¶
Returns 200 on success. data is null, indicating that the rerun request has been accepted; please continue to query the task status and file status to confirm the actual processing results.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
Success message with value |
|
null |
The interface does not return new task or file results. |
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 |
Make sure |
|
|
The task or file record does not exist, a failed retry file was not found, or the dependent resource is unavailable. |
Query the file status first; when |
|
|
The current identity does not have retry permission. |
Request permission to retry the export task. |
|
|
Authorization service is temporarily unavailable. |
Try again later. |
Follow-up operations¶
After retrying the acceptance, use the same task ID query task status to track the progress.