Query file list¶
Filter by volume and query files by page. The request must contain exactly one volume_id filter. In the console volume file list, a folder is an entry whose file_type is folder.
POST https://moi.matrixorigin.cn/newmoi/catalog/file/list
Preparation before calling¶
First query the object in the database to obtain the target volume ID. 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 of the file to be listed, passed viavolume_idinfilters.
The caller needs read permissions on the target root volume.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/catalog/file/list" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"filters": [
{
"name": "volume_id",
"values": ["'"$VOLUME_ID"'"]
}
],
"page": 1,
"page_size": 20
}'
Request body¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
array |
Yes |
Filter condition array, must contain a condition for |
|
string |
Yes |
Filter field name. |
|
array[string] |
Yes |
Filter value. |
|
boolean |
No |
Whether to use fuzzy matching when |
|
integer |
No |
Page number. |
|
integer |
No |
Number of items per page. |
|
string |
No |
Sort direction: |
|
string |
No |
Sorting field. |
In this document, [] after a type means an array; for example, string[] is an array of strings. In field paths, [] means each item in an array; for example, filters[].name is the name field of each item in filters.
Omitting volume_id and sending only parent_id returns 400. To open the layer that the console labels “Open folder”, keep the original volume_id and add parent_id set to that folder entry’s id.
Successful response¶
Returns 200 and the file list on success. The caller needs read permissions on the target root volume.
{
"code": "OK",
"msg": "OK",
"data": {
"total": 1,
"list": [
{
"id": "file-123",
"name": "orders.csv",
"file_type": "file",
"file_ext": "csv",
"size": 2048,
"parent_id": "",
"volume_id": "789",
"volume_name": "sales_files",
"created_at": "2026-01-01T00:00:00Z"
}
]
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
integer |
The total number of entries matching the filter criteria. |
|
array |
List of file and folder entries. |
|
string |
Entry ID. |
|
string |
Entry name. |
|
string |
Entry type: |
|
string |
Workflow product role; workflow output is |
|
string |
File extension. |
|
string |
Original file name; returned when applicable. |
|
string |
Original file extension; returned when applicable. |
|
integer |
File size in bytes. |
|
string |
Parent ID. |
|
string |
The volume ID to which it belongs. |
|
string |
The name of the volume to which it belongs. |
|
boolean |
Whether the volume it belongs to is a reserved volume. |
|
string |
Creation time, in RFC 3339 format. |
|
string |
Creator ID. |
|
string |
The associated source file ID; returned when applicable. |
|
string |
The file ID of the downloadable analysis product; returned when applicable. |
|
string |
Association workflow ID; returned when applicable. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "必须提供唯一的 volume_id 筛选条件",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The unique positive integer |
Keep only one |
|
|
The current identity does not have read permissions on the target root volume. |
Check workspace and volume authorization. |
|
|
The target volume does not exist. |
Check |
|
|
The service cannot read the file list. |
Record the request time and error message and try again; if it continues to fail, contact support. |
Follow-up operations¶
Use data.list[].id to Query file details. When file_type is folder, call this API again with the current volume_id and that entry’s id as parent_id. That request matches the console “Open folder” action.