Query the Catalog system tree¶
Query the read-only navigation tree of the system database.
POST https://moi.matrixorigin.cn/newmoi/catalog/system/tree
Preparation before calling¶
Prepare a personal access token and workspace ID that has 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.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/catalog/system/tree" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"include_table_leaves": false
}'
Request body¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
boolean |
No |
Whether to include table leaf nodes in the tree. |
Successful response¶
Returns 200 and the system library tree on success.
{
"code": "OK",
"msg": "OK",
"data": {
"tree": [
{
"type": "catalog",
"name": "system",
"node_list": []
}
]
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
array |
System library navigation tree. |
|
string |
Node type. |
|
string |
Node name. |
|
string |
Node description. |
|
array |
List of child nodes. |
|
string[] |
Operations allowed by the current identity on this node. |
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, data.tree[].name is the name field of each item in data.tree.
Error response¶
{
"code": "ErrServer",
"msg": "服务器内部错误",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The request body format is invalid. |
Check |
|
|
The current identity does not have permission to read the system tree. |
Use credentials with read permissions. |
|
|
The server failed to read the system tree. |
Try again later. |