Query database list¶
Returns a list of readable databases under the specified Catalog.
POST https://moi.matrixorigin.cn/newmoi/catalog/database/list
Preparation before calling¶
First query the catalog list to obtain the target catalog ID. Prepare the personal access token, target workspace ID, and Catalog 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.$CATALOG_ID: Catalog ID of the database to be listed.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/catalog/database/list" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": '"$CATALOG_ID"'
}'
Request body¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Catalog ID. |
Successful response¶
On success, returns 200 and a list of databases readable by the current identity.
{
"code": "OK",
"msg": "OK",
"data": {
"list": [
{
"id": 2,
"name": "orders",
"description": "订单库",
"volume_count": 1,
"file_count": 2,
"table_count": 3,
"created_at": "2026-08-18T10:00:00Z",
"updated_at": "2026-08-18T10:00:00Z",
"created_by": "user-001",
"updated_by": "user-001",
"reserved": false,
"allowed_actions": ["database.read"]
}
]
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object[] |
Database list; empty array when there is no readable database. |
|
integer |
Database ID. |
|
string |
Database name. |
|
string |
Database description. |
|
string |
Database display name; returned if there is a value. |
|
string |
Database display description; returned if there is a value. |
|
integer |
Number of subordinate volumes. |
|
integer |
Number of subordinate files. |
|
integer |
Number of subordinate tables. |
|
string |
Creation time. |
|
string |
Update time. |
|
string |
Creator ID. |
|
string |
Updater ID. |
|
boolean |
Whether to retain the database. |
|
boolean |
Whether it is a published database. |
|
boolean |
Whether the database is subscribed. |
|
string[] |
Operations allowed by the current identity. |
In this document, [] after a type means an array; for example, object[] is an array of objects. In field paths, [] means each item in an array; for example, data.list[].id is the id field of each item in data.list.
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The request body or Catalog ID is invalid. |
Use positive integer IDs from the Catalog list. |
|
|
The current identity does not have permission to read the Catalog. |
Requesting permission to |
|
|
Catalog does not exist or cannot be read. |
Verify Catalog ID and workspace. |
|
|
The server failed to read the database list. |
Try again later. |
Follow-up operations¶
Use data.list[].id Query database details.