GitLab API

GitlabTool

Actions1000

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. Fetch a cluster agent token by providing the project ID, agent ID, and token ID to automate deployment processes.
  2. Use the node to verify or audit cluster agent tokens associated with a project for security compliance.

Properties

Name Meaning
Skip Authentication Option to skip API authentication, useful for testing or public endpoints.
Authentication Selects 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 usage of the token.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the provided project ID, agent ID, and token ID are correct and exist in the GitLab instance.
  • Verify that the API key credential has sufficient permissions to access cluster agent tokens.
  • If skipping authentication, confirm the endpoint allows unauthenticated access, otherwise authentication errors will occur.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion