获取凭证详情
更新时间:2026-09-11
GET
https://api.dumate.cn/api/v1/vaults/{vaultId}/credentials/{credentialId}
本接口用于查询指定凭证(Credential)的详细信息。
权限说明
使用 API Key 鉴权调用 API 流程,具体调用流程,请查看认证鉴权。
请求参数
Headers 参数
除公共头域外,无其它特殊头域
URL 参数
vaultId
string
凭证(Credential)所属凭证空间(Vault)标识。
必选
credentialId
string
待查询的凭证(Credential)标识。
必选
请求结构
GET /api/v1/vaults/{vaultId}/credentials/{credentialId} HTTP/1.1
Host: api.dumate.cn
Authorization: Bearer <YOUR_API_KEY>
示例代码
请求示例
curl --location --request GET "https://api.dumate.cn/api/v1/vaults/vault_7b41ea1b855049a6/credentials/cred_1e19ca151c9042b2" \
--header 'Authorization: Bearer <YOUR_API_KEY>'
返回响应
Headers 参数
除公共头域外,无其它特殊头域
返回参数
id
string
凭证(Credential)标识。
可选
vaultId
string
所属凭证空间(Vault)标识。
可选
authType
string
凭证(Credential)鉴权类型。
可选值:mcp_oauth、static_bearer、environment_variable。
可选
mcpServerUrl
string
MCP 服务地址。
仅 authType 为 mcp_oauth、static_bearer 时返回。
可选
mcpId
string
MCP 连接标识。
仅 authType 为 mcp_oauth、static_bearer 时返回。
可选
name
string
凭证(Credential)名称。
可选
status
string
凭证(Credential)状态。
可选值:active:有效。revoked:已删除。
可选
createdAt
string
创建时间,ISO 8601 格式。
可选
updatedAt
string
最近更新时间,ISO 8601 格式。
可选
响应示例
{
"id": "cred_f2a047158e8c4793",
"vaultId": "vault_1d289d17946a49b1",
"authType": "mcp_oauth",
"mcpServerUrl": "<MCP_SERVER_URL>",
"mcpId": "fa10de0d-bc5d-4485-814a-16c0ead44a66",
"name": "C-OAuth-示例",
"status": "active",
"createdAt": "2026-08-13T13:04:50Z",
"updatedAt": "2026-08-13T13:04:50Z"
}
评价此篇文章
