Batch parsing file products¶
Batch query the existence of parsing products and their associated identifiers by file ID.
POST $CLOUDSIGMA_API_BASE/catalog/file-artifacts:batchResolve
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.
Request body¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/file-artifacts:batchResolve" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"file_ids": ["'"$FILE_ID"'"]
}'
Field |
Type |
Required |
Description |
|---|---|---|---|
|
array of string |
Yes |
List of file IDs to query. |
The service strips leading and trailing whitespace from file IDs and ignores empty entries, but retains duplicate IDs. When the number of different IDs exceeds 200, HTTP 400 is returned. HTTP 500 may currently be returned when the total number of duplicates exceeds 200.
The service checks whether the file exists and whether the caller has root volume permissions. When the file does not exist or there is no access permission, the entire batch of requests may fail and the corresponding result will not be directly set to false.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"items": [
{
"file_id": "file-01",
"file_exists": true,
"has_artifact": true,
"source_file_id": "file-01",
"parsed_file_id": "file-02",
"root_asset_id": "asset-root",
"parsed_asset_id": "asset-parsed",
"volume_id": 10
}
]
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
array of object |
File product parsing results. |
|
string |
Requested file ID. |
|
boolean |
whether the file exists. |
|
boolean |
Whether the file has related products. |
|
string |
Source file ID. |
|
string |
Parse product file ID. |
|
string |
Root data asset ID. |
|
string |
The ID of the data asset in process. |
|
string |
Resolve data asset IDs. |
|
string |
Original file name. Return when applicable. |
|
string |
Original file extension. Return when applicable. |
|
integer |
ID of the root volume to which the file belongs. |
Error response¶
{
"code": "ErrNotFound",
"msg": "对象不存在"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |