Query task list

Lists the import tasks in the current workspace that have read permission. Save the task ID from the response to view details, files, and run logs.

HTTP
GET $CLOUDSIGMA_API_BASE/task/list

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 and target workspace ID that can access the target workspace.

Query parameters

Replace $CLOUDSIGMA_API_KEY and $WORKSPACE_ID with actual values.

Paged reading

Shell
curl "$CLOUDSIGMA_API_BASE/task/list?page=1&page_size=20" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Filter and sort by criteria

Recurring query parameters represent multiple values.

Shell
curl "$CLOUDSIGMA_API_BASE/task/list?page=1&page_size=20&keyword=orders&status=4&status=5&source_connector_ids=conn_01&load_interval_types=4&order_by=ended_at&is_desc=false" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Filter by connector type

Use connector_sources to filter by source connector type. This parameter can appear repeatedly.

Shell
curl "$CLOUDSIGMA_API_BASE/task/list?connector_sources=5" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Add 1 to page until the cumulative number of read tasks reaches data.total in the response, or data.tasks of the next page is empty.

Shell
curl "$CLOUDSIGMA_API_BASE/task/list?page=2&page_size=20" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Paged reading

Parameter

Type

Required

Description

page

integer

No

Page number. Page 1 is used when omitted or less than 1.

page_size

integer

No

Number of items per page. Use 20 when omitted or less than 1.

keyword

string

No

Matches the task name or creator.

status

integer (integer array)

No

Task status filter, only accept 1–5. 0 is not a valid filter value.

source_connector_ids

array of string

No

Source connector ID.

load_interval_types

integer (integer array)

No

Import cycle type. 4 means one-time use.

order_by

string

No

Sort field. Available name, created_at, updated_at, started_at, ended_at or status.

is_desc

boolean

No

Whether to descend. True when omitted.

connector_sources

integer (integer array)

No

Source connector type code.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "tasks": [
      {
        "id": "task_01",
        "name": "import_orders",
        "config_type": 1,
        "source_connector_id": "conn_01",
        "connector_name": "orders_s3",
        "volume_id": "101",
        "status": 1,
        "total_rows": 100,
        "imported_rows": 0,
        "source_connector_type": 3,
        "volume_name": "原始数据",
        "volume_path": {
          "id_list": [
            "101"
          ],
          "name_list": [
            "原始数据"
          ]
        },
        "creator": "user_01",
        "source_config": {
          "common_file_task_config": {
            "type": 0,
            "uris": [
              "s3://example-bucket/orders.csv"
            ]
          }
        },
        "start_at": 1787882400,
        "end_at": 0,
        "created_at": 1787882400,
        "updated_at": 1787882400,
        "file_types": [],
        "path_regex": "",
        "unzip_keep_structure": false,
        "dedup": null,
        "table_path": {
          "id_list": [],
          "name_list": []
        },
        "load_results": [],
        "source_files": [
          [
            "orders_s3",
            "s3://example-bucket/orders.csv"
          ]
        ],
        "load_type": 0,
        "success_file_count": 0,
        "failed_file_count": 0,
        "target_path_state": "resolved"
      }
    ],
    "total": 1
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.tasks

array

Tasks readable by the current caller. For complete fields, see Import task return field.

data.tasks[].id

string

Task ID.

data.tasks[].name

string

Task name.

data.tasks[].config_type

integer

Task configuration type.

data.tasks[].source_connector_id

string

Source connector ID.

data.tasks[].connector_name

string

Source connector name.

data.tasks[].volume_id

string

Target volume ID.

data.tasks[].status

integer

The current status of the task.

data.tasks[].total_rows

integer

The total number of task lines.

data.tasks[].imported_rows

integer

Number of rows imported.

data.total

integer

The total number of tasks that match the filter criteria.

Error response

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

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

data

null

The error response is null.

Last updated on