POST /admin/tenants/{id}/api-keys/{key_id}/rotate
轮换指定 API Key,生成新 key 并使旧 key 立即失效
租户服务 `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
id |
path |
string |
Yes |
|
|
|
租户ID |
key_id |
path |
string |
Yes |
|
|
|
API Key ID |
Referenced Schemas
dto.DataResponse-dto_RotateApiKeyResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.RotateApiKeyResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
dto.RotateApiKeyResponse
| Field | Type | Required | Example | Constraints | Description |
api_key |
string |
No |
tk_f6e7d8c9a0b1... |
|
|
created_at |
string |
No |
2026-05-12T16:00:00Z |
|
|
id |
string |
No |
tak_001 |
|
|
key_prefix |
string |
No |
tk_f6e7d8c9 |
|
|
message |
string |
No |
请立即保存新API Key,旧Key已失效 |
|
|
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|