列出 Vaults

更新时间:
复制为 MD 格式

获取当前账户下所有 Vault 的列表,支持分页和状态过滤。

请求头

头部

必选

说明

Authorization

Bearer

查询参数

参数

类型

必选

说明

limit

integer

每页返回数量上限

after

string

游标分页:返回此 ID 之后的记录

status

string

按状态过滤,可选值:activearchived

完整分页规范详见 分页

示例请求

# 获取所有 Vault
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/vaults" \
  -H "Authorization: Bearer $QODER_PAT"

# 分页获取
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/vaults?limit=2" \
  -H "Authorization: Bearer $QODER_PAT"

# 按状态过滤
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/vaults?status=archived" \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK

{
  "data": [
    {
      "id": "vault_019e3bb940277f0db05ab74291acf6ef",
      "type": "vault",
      "display_name": "my-mcp-vault",
      "status": "active",
      "metadata": {},
      "created_at": "2026-05-18T15:34:16.874877Z",
      "updated_at": "2026-05-18T15:34:16.874877Z"
    }
  ],
  "first_id": "vault_019e3bb940277f0db05ab74291acf6ef",
  "last_id": "vault_019e3bb940277f0db05ab74291acf6ef",
  "has_more": false
}

空列表响应:

{
  "data": [],
  "first_id": null,
  "last_id": null,
  "has_more": false
}

响应字段

字段

类型

说明

data

array

Vault 对象数组

first_id

string \

null

last_id

string \

null

has_more

boolean

是否还有更多记录

错误码

HTTP

type

触发条件

401

authentication_error

缺少或无效的认证令牌

完整错误信封说明详见 错误参考