Query file list

Filter by volume and query files by page.

HTTP
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

Shell
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

filters

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.

page

integer

No

Page number.

page_size

integer

No

Number of items per page.

order

string

No

Sorting direction: asc or desc.

order_by

string

No

Sorting fields: id, file_id, file_name, file_path, file_ext, created_at, updated_at.

filters[].name

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.

filters[].values

array[string]

Yes

Filter array of values. volume_id or parent_id must locate a positive integer ID.

filters[].fuzzy

boolean

No

Whether to use fuzzy matching when name is file_name.

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

JSON
{
  "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

code

string

OK on success.

msg

string

OK on success.

data.total

integer

The total number of entries matching the filter criteria.

data.list

array of object

List of file and folder entries.

data.list[].id

string

Entry ID.

data.list[].name

string

Entry name.

data.list[].file_path

string

Stable relative path to the import source. Returned if there is a value.

data.list[].file_type

string

Entry type: file or folder.

data.list[].workflow_role

string

workflow product role. The workflow output is output, and other entries are empty strings.

data.list[].file_ext

string

File extension.

data.list[].origin_file_name

string

Original file name. Return when applicable.

data.list[].origin_file_ext

string

Original file extension. Return when applicable.

data.list[].size

integer

File size in bytes.

data.list[].parent_id

string

Parent ID.

data.list[].volume_id

string

The volume ID to which it belongs.

data.list[].volume_name

string

The name of the volume to which it belongs.

data.list[].volume_reserved

boolean

Whether the volume it belongs to is a reserved volume.

data.list[].created_at

string

Creation time, in RFC 3339 format.

data.list[].created_by

string

Creator ID.

data.list[].ref_file_id

string

The associated source file ID. Return when applicable.

data.list[].parsed_file_id

string

File ID of the downloadable analysis product. Return when applicable.

data.list[].ref_workflow_id

string

Associate workflow ID. Return when applicable.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "必须提供唯一的 volume_id 筛选条件"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on