GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation creates a new token for a specific cluster agent within a GitLab project. It is useful for automating the management of cluster agent tokens, which are used to authenticate and authorize cluster agents to interact with the GitLab project. For example, it can be used in CI/CD pipelines to programmatically generate tokens for cluster agents without manual intervention.

Use Case Examples

  1. Creating a new token for a cluster agent to enable automated deployments in a Kubernetes cluster.
  2. Generating tokens for cluster agents as part of a GitLab project setup automation script.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the request.
Authentication The authentication method used for the request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, default is POST for this operation.
Path Parameters Parameters required in the request path to identify the project and cluster agent.

Output

JSON

  • token - The newly created token for the cluster agent.
  • id - The identifier of the created token.
  • created_at - Timestamp when the token was created.

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID and agent ID are correct and exist in GitLab to avoid 404 errors.
  • Verify that the API token used for authentication has sufficient permissions to create cluster agent tokens.
  • If skipping authentication, the request will likely fail unless the GitLab instance allows anonymous token creation, which is uncommon.

Links

Discussion