Rotate API Key
轮转指定 API Key,并返回新的明文 Token。
/api/open/v1/keys/{key_id}/rotateEndpoint Overview
轮转指定 API Key,并返回新的明文 Token。
Authentication
Authorization: Bearer <token>api_keys:writePath Parameters
要轮转的 API Key ID。
Response
固定为 open_api.key.rotate。
轮转后的 Key 信息。
API Key ID。
API Key 名称。
所属环境。
当前 Key 具备的 scopes。
Key 状态。
Token 前缀。
Token 后四位。
掩码后的 Token 展示值。
Creation time.
Updated time.
最近使用时间。
最近使用 IP。
最近使用的 User-Agent。
撤销时间。
新签发的明文 Token,只会返回一次。
Common Errors
Missing or invalid Bearer token.
The current token hit a rate limit.
当前 API Key 不存在,或已被清理。
Notes
- 轮转成功后,旧 Token 立即失效。调用方要立刻Update密钥管理系统中的值。