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 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: File ID to parse.
Request¶
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"'"]
}'
Request body
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string[] |
Yes |
List of file IDs to query. |
[] after a type means an array. For example, string[] is an array of strings.
Successful response¶
When successful, 200 is returned. Each result item describes the corresponding file and product status.
{
"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
}
]
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
array |
File product analysis results. |
|
string |
Requested file ID. |
|
boolean |
Whether the file exists. |
|
boolean |
Whether the file has related products. |
|
string |
Source file ID. |
|
string |
Parsed product file ID. |
|
string |
Root data asset ID. |
|
string |
Parsed data asset ID. |
|
integer |
ID of the root volume to which the file belongs. |
Error response¶
{
"code": "ErrNotFound",
"msg": "对象不存在",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
File ID list is empty or invalid. |
Provide a non-empty list of file IDs. |
|
|
The current identity does not have read permissions on the root volume to which the file belongs. |
Use credentials with read permissions. |
|
|
The requested file does not exist. |
Check file ID. |
|
|
The server failed to parse the file product. |
Try again later. |