GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves a specific cluster agent token from a GitLab project using the GitLab API. It is useful for scenarios where you need to access or manage cluster agent tokens programmatically, such as automating token retrieval for CI/CD pipelines or infrastructure management.

Use Case Examples

  1. Retrieve a cluster agent token by specifying the project ID, agent ID, and token ID to automate deployment processes.
  2. Fetch token details to verify or audit cluster agent access within a GitLab project.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Select the authentication method, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use 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.
  • Verify that the GitLab API key credential has sufficient permissions to access cluster agent tokens.
  • If skipping authentication, confirm the endpoint supports unauthenticated access, otherwise authentication errors will occur.
  • Check the base URL is correct for your GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion