GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves details of a specific cluster within a GitLab group by making a GET request to the GitLab API endpoint `/api/v4/groups/{id}/clusters/{cluster_id}`. It is useful for users who want to fetch information about a particular cluster associated with a group in GitLab, such as for monitoring or managing cluster configurations.

Use Case Examples

  1. Fetch details of a Kubernetes cluster linked to a GitLab group by specifying the group ID and cluster ID.
  2. Use the node to integrate GitLab cluster data retrieval into an automation workflow for DevOps processes.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API access scenarios.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method HTTP method used for the API request, defaulting to GET.
Path Parameters Parameters for the API path including the group ID (`id`) and the cluster ID (`cluster_id`) to specify which cluster to retrieve.

Output

JSON

  • id - The unique identifier of the cluster.
  • name - The name of the cluster.
  • environment_scope - The environment scope associated with the cluster.
  • platform_kubernetes_api_url - The Kubernetes API URL of the cluster platform.
  • status - The current status of the cluster.
  • created_at - Timestamp when the cluster was created.
  • updated_at - Timestamp when the cluster was last updated.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID (`id`) and cluster ID (`cluster_id`) path parameters are correctly provided and valid; otherwise, the API will return an error.
  • If authentication is enabled, verify that the GitLab API key credential is correctly configured and has sufficient permissions to access group clusters.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct and accessible.
  • Common error messages include 404 Not Found if the cluster or group does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion