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 this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query the file list to obtain the file ID.
Set the operation-specific values used in the request:
$FILE_ID: Original file ID.
Empty file IDs in requests are ignored, and duplicate IDs are only processed as the first occurrence.
Request¶
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"'"]
}'
Request body
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string[] |
Yes |
A list of original file IDs to query. |
[] after a type means an array. For example, string[] is an array of strings.
Successful response¶
Returns 200 on success, items contains only processed file assets.
{
"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
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
array |
List of parsed data assets. |
|
integer |
Data asset internal ID. |
|
string |
Data asset identifier. |
|
string |
Data asset name. |
|
string |
ID of the corresponding source file. |
|
integer |
ID of the root volume that contains the file. |
|
string |
Data asset type. |
|
integer |
The number of data assets returned. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The file ID list is empty, exceeds the limit, or contains invalid values. |
Provide a non-empty list of file IDs. |
|
|
The current identity does not have read permission for the root volume that contains the file. |
Use credentials with read permissions. |
|
|
The server failed to query data assets. |
Try again later. |