Rerun the task¶
Rerun the specified files in the export task, or all failed files in the task. A successful response indicates that the retry was accepted.
POST $CLOUDSIGMA_API_BASE/export/task/$TASK_ID/rerun
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Confirm tasks and file records from Query Export Task File List. Prepare personal access token, target workspace ID and task ID that can access the target workspace.
Rerunning requires task retry permission, target connector usage permission, and read permission for all source files of the entire task. All sources are checked even if only some files are selected.
Path parameters and request body¶
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $TASK_ID, and $EXPORT_FILE_ID with actual values.
Rerun the specified file
curl -X POST "$CLOUDSIGMA_API_BASE/export/task/$TASK_ID/rerun" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d @- <<EOF
{
"files": ["$EXPORT_FILE_ID"]
}
EOF
Rerun all failed files
When files is omitted or an empty array is passed, the service only selects files that are currently in a failed state.
curl -X POST "$CLOUDSIGMA_API_BASE/export/task/$TASK_ID/rerun" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{}'
Rerun the specified file
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Export task ID in path. |
|
array of string |
No |
The ID of the export record to rerun. When explicitly specified, there is no restriction on recording the original state. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
This interface does not return new task or file results. |
Error response¶
{
"code": "ErrServer",
"msg": "没有可重新运行的文件",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |
If the submission fails and the rerun fails, an attempt will be made to restore the original task status. When restore also fails, the error may contain both commit and restore problems. Check the task and file status first before deciding on the next step.