所需权限:
service_account:update路径参数
string
必填
密钥标识符
请求头
string
可选,但建议携带。用相同的值重试会重放第一次的结果,而不会签发出第二把密钥。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST 'https://app.memorylake.ai/openapi/memorylake/admin/v1/api-keys/312/rotate' \
-H 'Authorization: Bearer sk-xxxxxx' \
-H 'Idempotency-Key: 7c1d2e3f-0a9b-4c8d-b7e6-f5a4d3c2b1a0'
{
"success": true,
"message": "Operation completed successfully",
"data": {
"id": "312",
"name": "ci-pipeline",
"key_prefix": "f6e5d4c3",
"key": "sk-f6e5d4c3...redacted...b2a1"
}
}
替换密钥内容,并一次性返回新值
POST /openapi/memorylake/admin/v1/api-keys/{id}/rotate
Idempotency-Key —— 盲目重试会让您刚刚拿到的密钥失效。service_account:updatecurl -X POST 'https://app.memorylake.ai/openapi/memorylake/admin/v1/api-keys/312/rotate' \
-H 'Authorization: Bearer sk-xxxxxx' \
-H 'Idempotency-Key: 7c1d2e3f-0a9b-4c8d-b7e6-f5a4d3c2b1a0'
{
"success": true,
"message": "Operation completed successfully",
"data": {
"id": "312",
"name": "ci-pipeline",
"key_prefix": "f6e5d4c3",
"key": "sk-f6e5d4c3...redacted...b2a1"
}
}