Query task status¶
Read a summary of the file processing status of the export task.
GET $CLOUDSIGMA_API_BASE/export/task/$TASK_ID/state
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. Get the task ID from Query export task details. Prepare personal access token and target workspace ID that can access the target workspace.
Path parameters¶
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and $TASK_ID with actual values.
curl "$CLOUDSIGMA_API_BASE/export/task/$TASK_ID/state" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The export task ID whose status is to be read. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"total": 4,
"pending": 0,
"running": 0,
"failed": 1,
"completed": 3
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
Summary of file processing status. |
|
integer |
The total number of files in the task. |
|
integer |
Number of files to be processed. and |
|
integer |
The number of files being exported. |
|
integer |
The number of files that failed to export. When it is |
|
integer |
The number of files that have been successfully completed. |
Error response¶
When the query fails, HTTP 200 may still be returned, but the code in the response is ErrServer and the data is null. Both the HTTP status and the business code must be checked, and the status count can only be read when the code is OK.
The following are common error responses. This response may also be received when the task does not exist, but it cannot be judged that the task does not exist based on ErrServer or the error message alone. First check the workspace and task ID, and then use Export task list to find readable tasks. Check the status after confirming the target task. When the target is confirmed but the query still fails, retain the HTTP status, business code, and request time, and contact support.
{
"code": "ErrServer",
"msg": "服务器内部错误",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |