撤销 API 密钥
OpenAPI 契约
- 方法
- DELETE
- 路径
/api/v1/api-keys/{id}- 认证
- jwtBearer (bearer)
- 响应状态
- 204 400 401 403 404 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"204": {
"description": "API key revoked",
"content": {}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"404": {
"description": "Requested API key was not found",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}DELETE /api/v1/api-keys/{id} 仅限 JWT。提供当前认证用户拥有的密钥 UUID id。该操作没有响应体;对已撤销的自有密钥重复调用是安全的。
nfy_ 自动化密钥不能撤销密钥。不属于该账户的密钥会报告为未找到;缺少或无效的 JWT 认证会被拒绝。应从所有 CI 存储和本地环境移除已撤销的秘密。
http
DELETE /api/v1/api-keys/{id}
Authorization: Bearer <access token>