GitLab API icon

GitLab API

Gitlab

Actions880

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 or infrastructure automation to programmatically generate tokens for cluster agents.

Use Case Examples

  1. Creating a new token for a cluster agent to enable secure communication between the agent and the GitLab project.
  2. Automating token generation for cluster agents as part of a deployment workflow.

Properties

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

Output

JSON

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

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 if using a self-hosted GitLab instance to ensure it is correct.

Links

Discussion