cluster_agents

Create an agent token

Creates a token for an agent. You must have the Maintainer or Owner role to use this endpoint. An agent can have only two active tokens at one time.

post/api/v4/projects/{id}/cluster_agents/{agent_id}/tokens

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Path parameters

idstring required

The ID or URL-encoded path of the project

agent_idinteger required

The ID of an agent

Request body

namestring required

The name for the token

descriptionstring

The description for the token

Response

Create an agent token

idinteger required
namestring required
descriptionstring required
agent_idinteger required
statusstring required
created_atstring date-time required
created_by_user_idinteger required
last_used_atstring date-time required
tokenstring required

Example response

{
  "id": 1,
  "agent_id": 1,
  "created_by_user_id": 1
}

Changes

No recorded changes to this operation across all 5 revisions of this API.