Skip to content

List all project access tokens

GET
/api/v4/projects/{id}/access_tokens

Lists all project access tokens for a specified project.

id
required
One of:
string

ID or URL-encoded path of the project

revoked
boolean
nullable

Filter tokens where revoked state matches parameter

Example
false
state
string
nullable
Allowed values: active inactive

Filter tokens which are either active or not

Example
active
created_before
string format: date-time
nullable

Filter tokens which were created before given datetime

Example
2022-01-01T00:00:00Z
created_after
string format: date-time
nullable

Filter tokens which were created after given datetime

Example
2021-01-01T00:00:00Z
last_used_before
string format: date-time
nullable

Filter tokens which were used before given datetime

Example
2021-01-01T00:00:00Z
last_used_after
string format: date-time
nullable

Filter tokens which were used after given datetime

Example
2022-01-01T00:00:00Z
expires_before
string format: date
nullable

Filter tokens which expire before given datetime

Example
2022-01-01
expires_after
string format: date
nullable

Filter tokens which expire after given datetime

Example
2021-01-01
search
string
nullable

Filters tokens by name

Example
token
sort
string
nullable

Sort tokens

Example
created_at_desc

OK

Media type application/json
object
id
integer format: int64
name
string
revoked
boolean
created_at
string format: date-time
description
string
scopes
array
user_id
integer format: int64
last_used_at
string format: date-time
active
boolean
granular
boolean
expires_at
string format: date-time
last_used_ips

The five most recent unique IP addresses that have authenticated with this token. When the limit is reached, the oldest IP address is removed. The list updates once per minute per token.

Array<string>
granular_scopes
Array<object>
object
access
string
permissions
array
project_id
integer format: int64
group_id
integer format: int64
access_level
integer
resource_type
string
resource_id
integer
Example
{
"id": 2,
"name": "John Doe",
"description": "Token to manage api",
"scopes": [
"api"
],
"user_id": 3,
"last_used_at": "2020-08-31T15:53:00.073Z",
"expires_at": "2020-08-31T15:53:00.073Z",
"last_used_ips": [
"127.0.0.1",
"127.0.0.2",
"127.0.0.3"
],
"granular_scopes": [
{
"access": "personal_projects",
"permissions": [
"read_job"
],
"project_id": 3,
"group_id": 5
}
],
"access_level": 40,
"resource_type": "project",
"resource_id": 1234
}

Bad Request

Not Found