GitLab API icon

GitLab API

Gitlab

Actions1062

Cluster_agents → postApiV4ProjectsIdClusterAgentsAgentIdTokens

AI-generated

Summary

Create a new token for a specified cluster agent within a GitLab project by providing the project ID and agent ID along with the required token details in the request body.

Inputs

  • id (required) — The ID or URL-encoded path of the project in GitLab.
  • agent_id (required) — The ID of the cluster agent for which the token will be created.
  • postApiV4ProjectsIdClusterAgentsAgentIdTokens (required) — The request body containing the token details to create for the specified cluster agent.
  • skipAuthentication — If set to true, skips using the GitLab API credentials for the request.
  • baseUrl — Optional base URL of the GitLab instance; defaults to 'https://gitlab.com'.

Output shape

a JSON object representing the created cluster agent token details as returned by the GitLab API

The operation sends a POST request to the path /api/v4/projects/{id}/cluster_agents/{agent_id}/tokens and returns the created token data. Authentication is used by default unless explicitly skipped. All path parameters and request body must be provided.

Links

Discussion