GitLab API

GitlabTool

Actions905

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 to deploy applications securely.

Use Case Examples

  1. Generate a new token for a cluster agent to enable automated deployments in a Kubernetes cluster.
  2. Create tokens for multiple cluster agents in a project to manage access control programmatically.

Properties

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

Output

JSON

  • token - The newly created token for the cluster agent.
  • id - The ID 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.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the URL is correct.

Links

Discussion