Query file list¶
Filter by volume and query files by page.
POST $CLOUDSIGMA_API_BASE/catalog/file/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. First query the object in the database to obtain the target volume ID. Prepare the personal access token, target workspace ID, and volume ID that can access the target workspace. The caller needs read permissions on the target root volume.
Request body¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/file/list" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"filters": [
{
"name": "volume_id",
"values": ["'"$VOLUME_ID"'"]
}
],
"page": 1,
"page_size": 20
}'
The request must contain exactly one volume_id filter.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
array |
Yes |
Filter condition array, one of volume_id or parent_id must be selected, and cannot be mixed. Both need to locate a positive integer volume or folder ID. |
|
integer |
No |
Page number. |
|
integer |
No |
Number of items per page. |
|
string |
No |
Sorting direction: |
|
string |
No |
Sorting fields: id, file_id, file_name, file_path, file_ext, created_at, updated_at. |
|
string |
Yes |
Supports volume_id, parent_id, file_id, file_ids, file_name, file_ext, and file_type. volume_id and parent_id are mutually exclusive. |
|
array[string] |
Yes |
Filter array of values. volume_id or parent_id must locate a positive integer ID. |
|
boolean |
No |
Whether to use fuzzy matching when |
Use volume_id to query the files in the volume, and use parent_id to query the files and subfolders under the folder. page and page_size must be within the signed 32 bit integer range, and there is no paging when filling in 0. Only file_name supports fuzzy fuzzy matching.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"total": 1,
"list": [
{
"id": "file-123",
"name": "orders.csv",
"file_type": "file",
"file_ext": "csv",
"size": 2048,
"parent_id": "",
"volume_id": "789",
"volume_name": "sales_files",
"created_at": "2026-01-01T00:00:00Z",
"workflow_role": "",
"origin_file_name": "",
"origin_file_ext": "",
"ref_file_id": "",
"parsed_file_id": "",
"created_by": "user_01",
"volume_reserved": false,
"ref_workflow_id": ""
}
]
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
integer |
The total number of entries matching the filter criteria. |
|
array of object |
List of file and folder entries. |
|
string |
Entry ID. |
|
string |
Entry name. |
|
string |
Stable relative path to the import source. Returned if there is a value. |
|
string |
Entry type: |
|
string |
workflow product role. The workflow output is |
|
string |
File extension. |
|
string |
Original file name. Return when applicable. |
|
string |
Original file extension. Return when applicable. |
|
integer |
File size in bytes. |
|
string |
Parent ID. |
|
string |
The volume ID to which it belongs. |
|
string |
The name of the volume to which it belongs. |
|
boolean |
Whether the volume it belongs to is a reserved volume. |
|
string |
Creation time, in RFC 3339 format. |
|
string |
Creator ID. |
|
string |
The associated source file ID. Return when applicable. |
|
string |
File ID of the downloadable analysis product. Return when applicable. |
|
string |
Associate workflow ID. Return when applicable. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "必须提供唯一的 volume_id 筛选条件"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |