GitLab API

GitlabTool

Actions1000

Overview

This node operation creates a new token for a specific cluster agent within a GitLab project. It is useful for managing access tokens for cluster agents, enabling secure interactions with the GitLab API for tasks such as automation, deployment, or integration workflows involving Kubernetes clusters.

Use Case Examples

  1. Creating a new token for a cluster agent to allow automated deployment pipelines to authenticate with the cluster.
  2. Generating a token for a cluster agent to enable secure communication between GitLab and a Kubernetes cluster.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication process for the API request.
Authentication Specifies the authentication method to use, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, defaulting to POST for this operation.
Path Parameters Parameters required in the API request path to identify the project and cluster agent.

Output

JSON

  • token - The newly created token for the cluster agent.
  • created_at - Timestamp when the token was created.
  • expires_at - Expiration timestamp of the token, if applicable.

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID and agent ID are correctly specified and exist in GitLab to avoid 404 errors.
  • Verify that the authentication token has sufficient permissions to create cluster agent tokens.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion