GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a specific cluster agent token from a GitLab project using the GitLab API. It is useful for managing and accessing tokens associated with cluster agents in GitLab projects, which can be essential for automation, security, and integration tasks involving Kubernetes clusters managed through GitLab.

Use Case Examples

  1. Fetch details of a specific cluster agent token to verify its permissions or status.
  2. Automate the retrieval of cluster agent tokens for use in CI/CD pipelines or infrastructure scripts.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Type of authentication used for the request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the request is sent, defaulting to https://gitlab.com.
Method HTTP method used for the request, default is GET.
Path Parameters Parameters required in the request path to identify the project, cluster agent, and token.

Output

JSON

  • id - The unique identifier of the cluster agent token.
  • name - The name of the cluster agent token.
  • created_at - Timestamp when the token was created.
  • revoked - Boolean indicating if the token has been revoked.
  • last_used_at - Timestamp of the last time the token was used.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID, agent ID, and token ID are correctly specified and exist in the GitLab instance.
  • Authentication errors may occur if the API key is missing, invalid, or lacks sufficient permissions.
  • Network or base URL misconfiguration can cause connection failures; verify the baseUrl property is correct.

Links

Discussion