api-keys

Update API Token

Changed on

Updates the name and status of an existing API token. Only the token owner can update their tokens. Token values cannot be changed after creation.

Security Note: Session-only authentication required to prevent token-based privilege escalation.

put/bodhi/v1/tokens/{id}

Request

  • Base URL: http://localhost:1135
  • URL: http://localhost:1135/bodhi/v1/tokens/{id}
  • Auth: OAuth 2 (authorization code, authorization URL /bodhi/v1/auth/initiate, token URL /bodhi/v1/auth/callback, scopes: resource_power_user)

Path parameters

idstring required

Unique identifier of the API token to update

Request body

namestring required

New descriptive name for the token

status'active' | 'inactive' required

Example request

{
  "name": "Updated Token Name",
  "status": "inactive"
}

Response

Token updated successfully

idstring required
user_idstring required
namestring required
token_prefixstring required
scopesstring required
status'active' | 'inactive' required
last_used_atstring date-time nullable
created_atstring date-time required
updated_atstring date-time required

Changes

    • warning

      removed the optional property ////// from the response with the status

    • warning

      removed the optional property ////// from the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      removed subschema #2 from the ////// response property oneOf list for the response status