Retry failed files

Retry the failed file specified in the import task. A successful response will not return the running record. Please query the file and running record again to confirm the result.

HTTP
POST $CLOUDSIGMA_API_BASE/task/retry

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

First Query task files, select only failed files; the task must be in completed or failed state.

Set the operation-specific values used in the request:

  • $TASK_ID: Import task ID.

  • $FILE_ID: ID of the failed file.

Request

Shell
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 "{\"task_id\":\"$TASK_ID\",\"ids\":[\"$FILE_ID\"]}"
Shell
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 "{\"task_id\":\"$TASK_ID\"}"

Retry all failed files:

Request body

Field

Type

Is it required

Description

task_id

string

yes

Import task ID.

ids

string[]

No

List of failed file IDs to retry; omitting or passing an empty array will retry the task on all failed files.

[] after a type denotes an array. [] in a field path denotes each item in an array.

Successful response

Returns 200 on success and data is null. A successful submission does not mean that the file has been processed.

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": null
}

The response fields are as follows.

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

null

This interface does not return retry run records.

Error response

JSON
{
  "code": "ErrForbidden",
  "msg": "permission denied",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

ErrParamInvalid

The request body is invalid, or the task is not in a completed or failed state.

Fix task_id and file ids, and try again after confirming the task status.

403

ErrForbidden

The caller does not have permission to operate the task.

Check workspace and object authorization.

503

ErrCoreAuthorizeUnavailable

The service is temporarily unable to complete the authorization check.

Try again later.

200

ErrServer

Service failed to submit retry.

Check both HTTP status and code.

Follow-up operations

After retrying the acceptance, Query task files and Query run records again to confirm whether the number of failed items has been reduced.

Last updated on