Retry failed files¶
Retry specified failed files, or all failed files, in an import task. A successful response means only that the retry request was accepted.
POST $CLOUDSIGMA_API_BASE/task/retry
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. Prepare personal access token, target workspace ID and task ID that can access the target workspace. First Query the import task file list and select the failed file. The task must be in Completed or Failed status.
Request body¶
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $TASK_ID, and $FILE_ID with actual values.
Retry specified failed file
curl -X POST "$CLOUDSIGMA_API_BASE/task/retry" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d "{\n \\"task_id\\": \\"$TASK_ID\\",\n \\"ids\\": [\"$FILE_ID\"]\n }"
Retry all failed files
Omitting ids, the service selects all currently failed files in the task.
curl -X POST "$CLOUDSIGMA_API_BASE/task/retry" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d "{\n \\"task_id\\": \\"$TASK_ID\\"\n }"
Retry specified failed file
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Import task ID. |
|
array of string |
Yes |
List of failed file IDs to retry. Each ID must belong to the task and be in a failed state. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
No retry run records are returned. |
Error response¶
{
"code": "ErrServer",
"msg": "task must be finished or failed before retry",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |