GitLab API icon

GitLab API

Gitlab

Actions917

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 authentication tokens associated with cluster agents in a project, which can be essential for automating deployments or integrations that require cluster agent authentication.

Use Case Examples

  1. Fetch all tokens for a cluster agent in a project to audit or manage access.
  2. Paginate through tokens if there are many, using the page and per_page query parameters.

Properties

Name Meaning
Skip Authentication If true, the node will skip using authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key 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.
Parameter Schema Defines the required and optional parameters for the API request, including project ID, agent ID, and pagination parameters.
Request Body Schema Schema for the request body, not used in this GET operation.
Request Path The API endpoint path template for retrieving cluster agent tokens.
Query Parameters Optional query parameters for pagination: page number and items per page.
Path Parameters Path parameters specifying the project ID and cluster agent ID for the API request.

Output

JSON

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

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and agent ID are correctly specified and URL-encoded if necessary.
  • Verify that the API key used for authentication has sufficient permissions to access cluster agent tokens.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • If pagination parameters are used, ensure they are valid integers to avoid API errors.

Links

Discussion