Query task status¶
Read the status summary of the export task.
GET $CLOUDSIGMA_API_BASE/export/task/$TASK_ID/state
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First Query task details to confirm the export task whose status you want to view.
Set the operation-specific values used in the request:
$TASK_ID: To view the status of the exported task ID, fill in the task ID position in the request address.
Request¶
curl "$CLOUDSIGMA_API_BASE/export/task/$TASK_ID/state" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The export task ID whose status is to be queried. |
Successful response¶
Returns 200 on success. data only provides an aggregate count of file processing status; pending, running and failed must be checked, HTTP success cannot be considered export completion.
{
"code": "OK",
"msg": "OK",
"data": {
"total": 4,
"pending": 0,
"running": 1,
"failed": 1,
"completed": 2
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
integer |
The total number of files in the task. |
|
integer |
Number of files to be processed. |
|
integer |
The number of files being exported. |
|
integer |
The number of files that failed to export. |
|
integer |
Number of files that have been successfully completed. |
Error response¶
{
"code": "ErrServer",
"msg": "Internal server error",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The task does not exist or the status statistics reading fails. |
Check |
|
|
The current identity does not have permission to read the task. |
Request that read permission be granted to the export task. |
Follow-up operations¶
When there are still files waiting or being processed, continue to query this interface with the same task ID. The export is complete when both the waiting and processing quantities are 0 and there are no failures. When there is a failure, Query export files locates the failed item, and if necessary, Rerun task.