token

patch/api/tokens/{id}

Path parameters

idstring uuid required

Token ID

Request body

namestring nullable

New name

permissionsTokenPermission[] nullable

New permissions

scope'all' | 'public' | 'selected'
scopeOrgsstring[] nullable

New UUIDs of the organizations to limit this token to

scopeReposstring[] nullable

New UUIDs of the repositories to limit this token to

Response

Token updated

creatorstring uuid nullable

UUID of the user that created this token. Not used for scoping Unset once the creating user has been deleted

expiresAtstring date-time nullable

Expiration

idstring uuid required

ID

lastUsedAtstring date-time nullable

Last used

namestring required

Name

ownerOrgstring uuid nullable

UUID of the organization that owns this token Only set for token_type = organization

ownerRepostring uuid nullable

UUID of the repository that owns this token. Only set for token_type = [ci, deploy, runner?]

ownerUserstring uuid nullable

UUID of the user who owns this token Only set for token_type = personal

permissionsTokenPermission[] required

Permissions

revokedAtstring date-time nullable

Revocation

scope'all' | 'public' | 'selected' required
tokenType'personal' | 'organization' | 'ci' | 'deploy' | 'runner' | 'instance' required
scopeOrgsstring[] required

UUIDs of the organizations this token is limited to

scopeReposstring[] required

UUIDs of the repositories this token is limited to

Changes

Changed in 1 of the 3 revisions of this API.1