Users
Rename an API key
- ALREADY_EXISTS when another of the caller's active, unexpired keys
has the new name.
- ABORTED when
etagis set and the key changed since it was read.
- ABORTED when
Scope: apikey:write
Authorization
bearerAuth AuthorizationBearer <token>
An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...
In: header
Path Parameters
user*string
The user id.
apiKey*string
The apiKey id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
RenameApiKeyRequest gives an API key a new name.
Response Body
application/json
curl -X POST "https://example.com/v1/users/string/apiKeys/string/rename" \ -H "Content-Type: application/json" \ -d '{ "new_name": "string" }'{ "api_key": { "id": "string", "name": "string", "display_name": "string", "resource_name": "string", "owner_id": "string", "scopes": [ "string" ], "expires_at": "2023-01-15T01:30:15.01Z", "status": "API_KEY_STATUS_UNSPECIFIED", "last_used_at": "2023-01-15T01:30:15.01Z", "revoked_at": "2023-01-15T01:30:15.01Z", "etag": "string", "created_by": { "id": "string", "display_name": "string", "email": "string" }, "created_at": "2023-01-15T01:30:15.01Z", "updated_at": "2023-01-15T01:30:15.01Z" }}