GitLab API icon

GitLab API

Gitlab

Actions917

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 deployment or monitoring purposes.

Use Case Examples

  1. Retrieve a cluster agent token by specifying the project ID, agent ID, and token ID to automate deployment workflows.
  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 API 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

Troubleshooting

  • Ensure the project ID, agent ID, and token ID are correct and exist in the GitLab instance to avoid 404 errors.
  • Verify that the API key used for authentication has sufficient permissions to access cluster agent tokens.
  • If skipping authentication, confirm that the endpoint supports unauthenticated access, otherwise the request will fail.

Links

Discussion