Update an API key
Updates mutable fields of an API key: display name, status (active / disabled / revoked), permission mode and access map, project scope, and constraints (budget / rate limit / expiry). Omitted fields keep their current values.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
API key id to update.
Body
New name. Omit to keep current.
New lifecycle status. Omit to keep current.
API_KEY_STATUS_UNSPECIFIED, API_KEY_STATUS_ACTIVE, API_KEY_STATUS_DISABLED, API_KEY_STATUS_REVOKED New permission preset. Omit to keep current.
PERMISSION_MODE_UNSPECIFIED, PERMISSION_MODE_ALL, PERMISSION_MODE_RESTRICTED, PERMISSION_MODE_READ_ONLY Replacement access map. Required when changing to
PERMISSION_MODE_RESTRICTED; ignored otherwise. Provide an empty
map to clear. See ApiKey.access for the full catalog of valid
keys (Domain.id) and AccessLevel string values, or fetch the
live catalog via the capability catalog endpoint.
New project scope. Omit to keep current.
New expiration. Omit to keep current. Set clear_expires_at = true
to remove an existing expiration (a zero Timestamp here would still
mean "no change" because of optional semantics).
Force-clear the expiration. Mutually exclusive with expires_at.
Response
OK
Updated api-key.