Query task details¶
Read the definition and current status of an import task. After creating, pausing, resuming, or retrying, you can use this interface to confirm whether the task has entered the expected state.
GET $CLOUDSIGMA_API_BASE/task/get?task_id=$TASK_ID
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.
Query parameters¶
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and $TASK_ID with actual values.
curl "$CLOUDSIGMA_API_BASE/task/get?task_id=$TASK_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The import task ID to view. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"task": {
"id": "task_01",
"name": "import_orders",
"config_type": 1,
"source_connector_id": "conn_01",
"connector_name": "orders_s3",
"volume_id": "vol_01",
"status": 1,
"total_rows": 100,
"imported_rows": 0
}
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
Task definition and current processing status. For the meaning of the fields, see Import task return field. |
|
string |
Task ID. |
|
string |
Task name. |
|
integer |
Task configuration type. |
|
string |
Source connector ID. |
|
string |
Source connector name. |
|
string |
Target volume ID. |
|
integer |
Current task status. |
|
integer |
The cumulative number of rows to be processed. |
|
integer |
The cumulative number of imported rows. |
Error response¶
Some deployments may return HTTP 200 and the following generic errors when querying for non-existent tasks. HTTP 200 does not mean that the task has been read. You must confirm that the code in the response is OK and contains data.task before reading the task status.
ErrServer may also be caused by a service failure. It cannot be judged that the task does not exist based only on the business code or error message. First check the workspace and task ID, and then use Import task list to find readable tasks. If the details return 404, check the target before calling. If 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 |