更新上下文数据库 API Key
接口说明
更新 API Key 的展示元数据。Name 与 Description 至少传其一;明文 Key 不重新签发。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET / HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| WorkspaceId |
string |
是 |
业务空间 ID |
ws-as1llqmkol**** |
| MemberId |
string |
是 |
成员 ID |
mb-cz51tnnp8**** |
| KeyId |
integer |
是 |
API Key ID |
1024 |
| Name |
string |
否 |
新的展示名称 |
my-key |
| Description |
string |
否 |
新的描述 |
for nightly cron |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
更新成功 |
||
| RequestId |
string |
请求 ID |
FE9C65D7-930F-57A5-A207-8C396329**** |
| KeyId |
integer |
密钥 ID |
1024 |
| Name |
string |
Api Key 名称 |
my-key |
| Description |
string |
Api Key 描述 |
for nightly cron |
| KeyPrefix |
string |
API Key 的前缀 |
ctxdb- |
| KeyDisplaySuffix |
string |
API Key 的后缀 |
33631c |
| Status |
string |
Api Key 状态 |
active |
| CreatedAt |
string |
创建时间 |
2026-05-28T17:59:55Z |
| LastUsedAt |
string |
最近使用时间 |
2026-06-01T08:30:12Z |
| ExpiresAt |
string |
预留字段,该字段为空 |
(null) |
| RevokedAt |
string |
吊销时间 |
(null) |
示例
正常返回示例
JSON格式
{
"RequestId": "FE9C65D7-930F-57A5-A207-8C396329****",
"KeyId": 1024,
"Name": "my-key",
"Description": "for nightly cron",
"KeyPrefix": "ctxdb-",
"KeyDisplaySuffix": "33631c",
"Status": "active",
"CreatedAt": "2026-05-28T17:59:55Z",
"LastUsedAt": "2026-06-01T08:30:12Z",
"ExpiresAt": "(null)",
"RevokedAt": "(null)"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter | Request parameter is invalid. | |
| 401 | Unauthorized | Unauthorized. | |
| 500 | InternalError | Internal server error. | |
| 403 | NoPermission | Permission denied. | |
| 502 | UpstreamError | Upstream service returned an error. | |
| 404 | ResourceNotFound | Resource not found. | |
| 409 | ResourceAlreadyExists | Resource state conflict. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。