Query data assets in batches¶
Batch query of generated data assets by original file ID. Unprocessed files will not appear in the results.
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¶
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 |
|---|---|---|---|
|
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¶
{
"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 |
|---|---|---|
|
string |
|
|
string |
|
|
array of object |
List of parsed data assets. |
|
integer |
The number of data assets returned. |
|
integer |
Data asset record ID. |
|
string |
Data asset identification. |
|
string |
Data asset name. |
|
string |
Corresponding original file ID. |
|
integer |
The ID of the root volume to which it belongs. |
|
string |
Data asset source. Return when applicable. |
|
object |
Extended metadata. Keys are written by the processing link, and the server does not define a fixed key set. |
|
integer |
Unix timestamp of creation time in seconds. |
|
integer |
Unix timestamp of the update time in seconds. |
|
string |
Data asset type. |
|
string |
Data asset reference identifier. Return when applicable. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |