GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves clusters associated with a specific GitLab group by calling the GitLab API endpoint `/api/v4/groups/{id}/clusters`. It supports pagination through query parameters to control the page number and the number of items per page. This operation is useful for users who want to manage or monitor Kubernetes clusters linked to their GitLab groups, for example, to automate cluster management or integrate cluster data into workflows.

Use Case Examples

  1. Fetch all clusters for a GitLab group with ID '123' to monitor cluster status.
  2. Paginate through clusters of a group to process or display cluster information in batches.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, default is GET.
Query Parameters Optional query parameters for pagination: 'page' for current page number and 'per_page' for number of items per page.
Path Parameters Path parameter 'id' specifying the ID of the GitLab group whose clusters are being retrieved.

Output

JSON

  • clusters - Array of cluster objects associated with the specified GitLab group
  • pagination
    • page - Current page number of the results
    • per_page - Number of items per page in the results
    • total - Total number of clusters available

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the 'id' path parameter is correctly set to a valid GitLab group ID; otherwise, the API will return an error.
  • If authentication is enabled, verify that the API key or token is valid and has sufficient permissions to access group clusters.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the API endpoint is reachable.
  • Pagination parameters 'page' and 'per_page' should be integers; invalid values may cause request failures.

Links

Discussion