Query exportable files¶
Lists processed files in a volume that can be used to create export tasks.
POST https://moi.matrixorigin.cn/newmoi/export/volumes/$VOLUME_ID/files
Preparation before calling¶
First confirm that there are exportable processing results in the target volume. Prepare the personal access token, target workspace ID, and volume ID 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.$VOLUME_ID: The volume ID to be queried, fill in the volume ID position in the request address.
This interface only returns files in the volume with vectorized processing results. The MatrixOne file tree of the currently created page can also display the parsed processing results; when you need to select files by page, please refer to the page file tree.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/export/volumes/$VOLUME_ID/files" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
}'
Path parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The volume ID to query. |
Request body¶
Field |
Type |
Is it required |
Description |
|---|---|---|---|
|
integer[] |
No |
Filter by file type. |
|
integer[] |
No |
Processing status of exclusions. |
|
string |
No |
Sort by file creation time when non-null value is passed in. |
|
boolean |
No |
|
|
integer |
no |
Paging offset. |
|
integer |
No |
This page returns the number of items; if not passed, it will be |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Successful response¶
Returns 200 on success. data.items are exportable processed files; use id as the value of files[].file_id when creating the export task.
{
"code": "OK",
"msg": "OK",
"data": {
"total": 1,
"items": [{
"id": "file-001",
"file_name": "summary.csv",
"file_status": 2,
"file_type": 1
}]
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
integer |
The total number of files that match the current filter conditions. |
|
object[] |
List of exportable files. |
|
string |
File ID. |
|
string |
File name. |
|
integer |
The current processing status of the file. |
|
integer |
File type identifier. |
Error response¶
{
"code": "ErrServer",
"msg": "Internal server error",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
— |
|
Use positive integer volume IDs and check filter and sort field types. |
|
|
The volume does not exist, or the dependent processing and file listing services are unavailable. |
Retry after checking the volume and dependent services; if there is no matching file, a successful response returns an empty list. |
|
|
The current identity does not have read permission to the volume. |
Requesting to grant read permission to the volume. |
|
|
Authorization service is temporarily unavailable. |
Try again later. |
Follow-up operations¶
After selecting the exportable file, go to Create Task to submit the export.