Query task details

Read the definition and current status of an import task. After creating, pausing, resuming or retrying, use this interface to confirm whether the task has entered the expected state.

HTTP
GET $CLOUDSIGMA_API_BASE/task/get?task_id=$TASK_ID

Before you call this API

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

Set the operation-specific values used in the request:

  • $TASK_ID: Create data.task_id in task response.

Request

Shell
curl "$CLOUDSIGMA_API_BASE/task/get?task_id=$TASK_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Query parameters

Parameters

Type

Is it required

Description

task_id

string

Yes

The import task ID to be queried.

Successful response

Returns 200 on success.

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "task": {
      "id": "task_01",
      "name": "import_orders",
      "config_type": 1,
      "source_connector_id": "conn_01",
      "connector_name": "orders_mysql",
      "volume_id": "vol_01",
      "status": 2,
      "total_rows": 100,
      "imported_rows": 100,
      "success_file_count": 1,
      "failed_file_count": 0,
      "latest_rows": {
        "read_rows": 100,
        "succeeded_rows": 100,
        "failed_rows": 0,
        "complete": true
      },
      "error_code": "",
      "error_summary": ""
    }
  }
}

The response fields are as follows.

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.task

object

Task definition and current processing status. See Import task object fields for each field of this object.

Error response

JSON
{
  "code": "ErrServer",
  "msg": "server error",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

200

ErrServer

The task does not exist, cannot be read, or the service failed to query the task.

Check both HTTP status and code, and confirm task_id and authorization.

Follow-up operations

Use the task ID Query task files to view file-level results, or Query running records to view previous runs. When there are many failed files, give the id of the failed files to Retry failed files.

Last updated on