GitLab API icon

GitLab API

Gitlab

Actions1062

Clusters → getApiV4ProjectsIdClustersClusterId

AI-generated

Summary

Retrieve detailed information about a specific Kubernetes cluster associated with a GitLab project by providing the project ID or URL-encoded path and the cluster ID.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project to fetch the cluster from.
  • cluster_id (required) — The unique identifier of the cluster associated with the project.
  • baseUrl — The base URL of the GitLab instance; defaults to https://gitlab.com.
  • skipAuthentication — Whether to skip authentication; defaults to false.
  • method — HTTP method to use; defaults to GET. For this operation, GET is used.

Output shape

a single JSON object representing the cluster details for the specified project and cluster ID

Returns the response from the GitLab API endpoint /api/v4/projects/{id}/clusters/{cluster_id}. Requires authentication unless Skip Authentication is enabled.

Examples

Example 1: Fetch information of a project cluster

Set 'Id' to the project's ID or encoded path, 'Cluster_id' to the target cluster's ID, and leave other defaults to perform a GET request to retrieve cluster details.

Links

Discussion