access_tokens
Rotate a project access token
Rotates a project access token by passing it to the API in a header.
post/api/v4/projects/{id}/access_tokens/self/rotate
Request
- Base URLhttps://gitlab.com
- Authnone declared
Path parameters
idstring required
The project ID
Request body
Example request
{
"expires_at": "2021-01-31"
}Response
Rotate a project access token
Example response
{
"id": 2,
"name": "John Doe",
"description": "Token to manage api",
"scopes": [
"api"
],
"user_id": 3,
"last_used_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
}
],
"expires_at": "2020-08-31T15:53:00.073Z",
"access_level": 40,
"resource_type": "project",
"resource_id": 1234
}Changes
No recorded changes to this operation across all 5 revisions of this API.