Query data assets in batches

Batch query of generated data assets by original file ID. Unprocessed files will not appear in the results.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/data-assets/batch-get

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 file list to obtain the file ID. Prepare a list of personal access tokens, target workspace IDs, and file IDs that can access the target workspace. Empty file IDs in requests are ignored, and duplicate IDs are only processed as the first occurrence.

Request body

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/data-assets/batch-get" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "raw_file_ids": ["'"$FILE_ID"'"]
  }'

Field

Type

Required

Description

raw_file_ids

array of string

Yes

List of raw file IDs to query.

After the service sorts out the file IDs, it can process up to 100 targets at a time. Returns HTTP 400 when exceeded. When more files need to be queried, call them in batches.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "items": [
      {
        "id": 1,
        "asset_id": "asset-01",
        "name": "orders.csv",
        "raw_file_id": "file-01",
        "volume_id": 10,
        "asset_type": "file"
      }
    ],
    "total": 1
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.items

array of object

List of parsed data assets.

data.total

integer

The number of data assets returned.

data.items[].id

integer

Data asset record ID.

data.items[].asset_id

string

Data asset identification.

data.items[].name

string

Data asset name.

data.items[].raw_file_id

string

Corresponding original file ID.

data.items[].volume_id

integer

The ID of the root volume to which it belongs.

data.items[].source

string

Data asset source. Return when applicable.

data.items[].meta

object

Extended metadata. Keys are written by the processing link, and the server does not define a fixed key set.

data.items[].created_at

integer

Unix timestamp of creation time in seconds.

data.items[].updated_at

integer

Unix timestamp of the update time in seconds.

data.items[].asset_type

string

Data asset type.

data.items[].asset_ref

string

Data asset reference identifier. Return when applicable.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on