GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves details of a specific cluster associated with a GitLab project by making a GET request to the GitLab API endpoint `/api/v4/projects/{id}/clusters/{cluster_id}`. It is useful for scenarios where you need to fetch cluster information such as status, configuration, or metadata for a given project and cluster ID in GitLab. For example, it can be used in DevOps workflows to monitor or audit cluster resources linked to projects.

Use Case Examples

  1. Fetch cluster details for a project to monitor cluster health.
  2. Retrieve cluster metadata for integration with other systems or dashboards.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters to specify the project ID or URL-encoded path and the cluster ID to identify the cluster to retrieve.

Output

JSON

  • id - The unique identifier of the cluster.
  • name - The name of the cluster.
  • environment_scope - The environment scope of the cluster.
  • status - The current status of the cluster.
  • platform_kubernetes - Details about the Kubernetes platform 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 project ID and cluster ID are correct and exist in GitLab to avoid 404 errors.
  • Check that the GitLab API key has sufficient permissions to access cluster information.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated access, otherwise the request will fail.
  • Verify the base URL is correct for your GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion