API Keys
Rotate an API key
Changed onRotate an API key. Issues a new key that copies the name and project of the rotated key, and schedules the rotated key to expire after a grace period so in-flight callers can swap over. The new plaintext key is returned once.
post/org/api_keys/{id}/rotate
Request
- Base URLhttps://api.onkernel.com
- URLhttps://api.onkernel.com/org/api_keys/{id}/rotate
- AuthHTTP bearer
Path parameters
idstring required
API key ID
Request body
Example request
{
"days_to_expire": 30,
"expire_in_days": 7
}Response
New API key created from the rotation
Example response
{
"created_by": {
"email": "user@example.com",
"id": "user-abc123",
"name": "Jane Doe"
},
"id": "ckv9w8q2f000001l5r3j7k9m4",
"masked_key": "sk_1234...abcd",
"name": "production",
"policy": {
"statements": [
{
"action": "browsers:use",
"resource": "projects/proj_abc123/browsers/br_abc123"
}
]
},
"project_id": "proj_abc123",
"project_name": "Production",
"key": "sk_1234abcd"
}Changes
- info
added the required property
////to the response with the status
- info
- info
added the optional property
////to the response with the status
- info