Rotate a project access token
POST
/api/v4/projects/{id}/access_tokens/self/rotate
Rotates a project access token by passing it to the API in a header.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” id
required
string
The project ID
Request Body
Section titled “ Request Body ” Media type application/json
object
expires_at
The expiration date of the token
string format: date
Example
2021-01-31Responses
Section titled “ Responses ”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
token
string
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
Unauthorized
Forbidden
Not Found
Method not allowed