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.
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
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.
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.
curl "$CLOUDSIGMA_API_BASE/task/list?connector_sources=5" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Read next page
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.
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 |
|---|---|---|---|
|
integer |
No |
Page number. Page 1 is used when omitted or less than 1. |
|
integer |
No |
Number of items per page. Use 20 when omitted or less than 1. |
|
string |
No |
Matches the task name or creator. |
|
integer (integer array) |
No |
Task status filter, only accept 1–5. 0 is not a valid filter value. |
|
array of string |
No |
Source connector ID. |
|
integer (integer array) |
No |
Import cycle type. 4 means one-time use. |
|
string |
No |
Sort field. Available |
|
boolean |
No |
Whether to descend. True when omitted. |
|
integer (integer array) |
No |
Source connector type code. |
Successful response¶
{
"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 |
|---|---|---|
|
string |
|
|
string |
|
|
array |
Tasks readable by the current caller. For complete 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 |
The current status of the task. |
|
integer |
The total number of task lines. |
|
integer |
Number of rows imported. |
|
integer |
The total number of tasks that match the filter criteria. |
Error response¶
{
"code": "ErrForbidden",
"msg": "permission denied",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |