Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
GET /v1/vaults/{vault_id}/credentials
获取指定 Vault 下的所有凭证列表。
请求头
| 头部 | 必选 | 说明 |
|---|
Authorization | 是 | Bearer <PAT> |
路径参数
| 参数 | 类型 | 必选 | 说明 |
|---|
vault_id | string | 是 | Vault 的唯一标识符 |
查询参数
| 参数 | 类型 | 必选 | 说明 |
|---|
limit | integer | 否 | 每页返回数量上限 |
after | string | 否 | 游标分页:返回此 ID 之后的记录 |
完整分页规范详见 分页。
示例请求
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/vaults/vault_019e3bb940277f0db05ab74291acf6ef/credentials" \
-H "Authorization: Bearer $QODER_PAT"
示例响应
HTTP 200 OK
{
"data": [
{
"id": "vcred_019e3bb940297658a632dbf920057eff",
"vault_id": "vault_019e3bb940277f0db05ab74291acf6ef",
"mcp_server_url": "https://example.com/mcp",
"protocol": "sse",
"type": "static_bearer",
"status": "active",
"created_at": "2026-05-18T15:34:16.876188Z",
"updated_at": "2026-05-18T15:34:16.876188Z"
}
],
"first_id": "vcred_019e3bb940297658a632dbf920057eff",
"last_id": "vcred_019e3bb940297658a632dbf920057eff",
"has_more": false
}
响应字段
| 字段 | 类型 | 说明 |
|---|
data | array | VaultCredential 对象数组 |
first_id | string | null | 当前页第一条记录 ID |
last_id | string | null | 当前页最后一条记录 ID |
has_more | boolean | 是否还有更多记录 |
VaultCredential 对象:
| 字段 | 类型 | 说明 |
|---|
id | string | 凭证唯一标识符(vcred_ 前缀) |
vault_id | string | 所属 Vault 的 ID |
mcp_server_url | string | MCP 服务器 URL |
protocol | string | 协议:sse 或 streamable_http |
type | string | 凭证类型:static_bearer |
status | string | 状态:active |
created_at | string | 创建时间(ISO 8601) |
updated_at | string | 最后更新时间(ISO 8601) |
错误码
| HTTP | type | 触发条件 |
|---|
| 401 | authentication_error | 缺少或无效的认证令牌 |
| 404 | not_found_error | Vault 不存在或已删除 |
注意事项
- 凭证列表中不会返回
access_token 的值(出于安全考虑)
- 仅返回
active 状态的凭证
完整错误信封说明详见 错误参考。