GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves details of a specific cluster associated with a project in GitLab using the GitLab API. It is useful for scenarios where you need to fetch cluster information by providing the project ID or URL-encoded path and the cluster ID. For example, it can be used to monitor or manage Kubernetes clusters linked to GitLab projects.

Use Case Examples

  1. Fetch cluster details for a given project to display cluster status in a dashboard.
  2. Retrieve cluster information to automate deployment workflows based on cluster attributes.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Type of authentication to use, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to 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.
  • created_at - Timestamp when the cluster was created.
  • platform_kubernetes_version - Version of Kubernetes running on the cluster.
  • provider_type - Type of provider for the cluster (e.g., user, instance).

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and cluster ID are correctly provided and URL-encoded if necessary.
  • Verify that the GitLab API key credential has sufficient permissions to access cluster information.
  • If skipping authentication, confirm the endpoint supports unauthenticated access, otherwise authentication errors will occur.
  • Common error messages include 404 Not Found if the project or cluster does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion