查看 Catalog 列表

返回当前工作区中可访问的 Catalog 列表。

POST https://api.moi.matrixorigin.cn/v5/catalog/list

调用前准备

准备有目标工作区访问权限的个人访问令牌和目标工作区 ID。

请求参数

curl -X POST "https://api.moi.matrixorigin.cn/v5/catalog/list" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

无请求参数。

成功响应

成功时返回 200 和当前身份可读取的 Catalog 列表。

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "list": [
      {
        "id": 1,
        "name": "sales",
        "display_name": "sales",
        "description": "销售数据",
        "database_count": 1,
        "volume_count": 1,
        "file_count": 2,
        "table_count": 3,
        "created_at": "2026-08-18T10:00:00Z",
        "created_by": "user-001",
        "updated_at": "2026-08-18T10:00:00Z",
        "updated_by": "user-001",
        "reserved": false,
        "allowed_actions": ["catalog.read", "catalog.update"]
      }
    ]
  }
}

字段

类型

说明

code

string

成功时为 OK

msg

string

成功时为 OK

下面表格展开响应示例中 data 对象;每一行是该对象的一个字段。

字段

类型

说明

list

array of object

Catalog 列表;没有可读 Catalog 时为空数组。

下面表格展开响应示例中 data.list 数组的每一项;每一行是该数组项的一个字段。

字段

类型

说明

id

integer

Catalog ID。

name

string

Catalog 名称。

description

string

Catalog 说明。

display_name

string

Catalog 显示名称;有值时返回。

display_description

string

Catalog 显示说明;有值时返回。

database_count

integer

下属数据库数量。

volume_count

integer

下属卷数量;有值时返回。

file_count

integer

下属文件数量;有值时返回。

table_count

integer

下属表数量;有值时返回。

created_at

string

创建时间;有值时返回。

created_by

string

创建者标识;有值时返回。

updated_at

string

更新时间;有值时返回。

updated_by

string

更新者标识;有值时返回。

reserved

boolean

是否为保留 Catalog。

allowed_actions

array of string

当前身份允许的操作。

错误响应

{
  "code": "ErrServer",
  "msg": "服务器内部错误",
  "data": null
}

字段

类型

说明

code

string

错误代码。

msg

string

错误信息。

data

null

错误响应中的附加数据;本示例为 null

后续操作

使用 data.list[].id 查询 Catalog 详情

最后更新于