GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves tokens for a specific cluster agent within a GitLab project using the GitLab API. It is useful for managing and accessing cluster agent tokens programmatically, which can be essential for automation and integration tasks involving GitLab cluster agents. For example, a DevOps engineer might use this node to list tokens for a cluster agent to audit or rotate credentials.

Use Case Examples

  1. Retrieve tokens for a cluster agent in a project to audit access.
  2. Automate the management of cluster agent tokens in CI/CD pipelines.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, defaulting to GET.
Query Parameters Optional query parameters for pagination, including page number and items per page.
Path Parameters Required path parameters identifying the project and cluster agent.

Output

JSON

  • tokens - List of tokens associated with the specified cluster agent in the project.

Dependencies

  • GitLab API authentication

Troubleshooting

  • Ensure that the project ID and agent ID are correctly specified and URL-encoded if necessary.
  • Verify that the API authentication credentials are valid and have sufficient permissions to access cluster agent tokens.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion