Skip to main content
Credentials

列出 Credential

Forward Credentials API 接口说明。

描述

获取指定 Vault 下的 Credential 列表,支持分页和过滤。

路径

GET /api/v1/forward/vaults/{id}/credentials

请求头

头部必选说明
AuthorizationBearer <PAT 或 SAT>

路径参数

参数类型必选说明
idstringVault ID。

查询参数

参数类型必选说明
limitinteger分页大小,最大 100。
pagestring分页游标(推荐使用),取值来自上一页响应的 next_page;与 after_idbefore_id 互斥。
after_idstring向后翻页游标;与 pagebefore_id 互斥。
before_idstring向前翻页游标;与 pageafter_id 互斥。
namestringmcp_server_url 搜索。

示例请求

curl -X GET "https://api.qoder.com/api/v1/forward/vaults/vault_xxx/credentials" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

示例响应

{
  "data": [
    {
      "id": "vcred_xxx",
      "type": "vault_credential",
      "vault_id": "vault_xxx",
      "auth": {
        "type": "static_bearer",
        "mcp_server_url": "https://mcp.example.com"
      },
      "display_name": "",
      "metadata": {
        "source": "console"
      },
      "created_at": "2026-07-23T10:00:00Z",
      "updated_at": "2026-07-23T10:00:00Z"
    }
  ],
  "first_id": "vcred_xxx",
  "last_id": "vcred_xxx",
  "has_more": false,
  "next_page": null
}

空列表响应

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

响应字段

响应 data 数组每一项为 Vault credential 对象。分页字段详见 列表分页字段

错误码

HTTPtype触发条件
400invalid_request_error请求体、路径参数或查询参数非法。
401authentication_error缺少或无效的认证令牌。
403permission_error当前调用方无权访问该资源。
404not_found_errorVault 不存在或不可见。
500/502/503api_errorForward 或依赖服务失败。