token

get/api/tokens

Query parameters

orgstring uuid nullable

List the tokens owned by this organization

repostring uuid nullable

List the tokens owned by this repository

instanceboolean nullable

List the tokens that are not owned by anyone

type'personal' | 'organization' | 'ci' | 'deploy' | 'runner' | 'instance'

Filter by token type

includeRevokedboolean nullable

Include revoked tokens

offsetinteger nullable

Pagination offset

limitinteger nullable

Maximum number of results (max 100, default 20)

Response

List of tokens

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