Batch parsing file products¶
Batch query the existence of parsing products and their associated identifiers by file ID.
POST https://moi.matrixorigin.cn/newmoi/catalog/file-artifacts:batchResolve
Preparation before calling¶
First query the file list to obtain the file ID. Prepare a list of personal access tokens, target workspace IDs, and file IDs that have access to the target workspace.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.$FILE_ID: File ID to parse.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/catalog/file-artifacts:batchResolve" \
-H "X-API-Key: $AI_STUDIO_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. |