GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows users to add a user cluster to a specific project in GitLab by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/clusters/user`. It is useful for managing Kubernetes clusters associated with GitLab projects, enabling automation of cluster user assignments within CI/CD workflows or project infrastructure management.

Use Case Examples

  1. Automatically add a Kubernetes cluster user to a GitLab project when a new project is created.
  2. Integrate cluster user management into a DevOps pipeline to ensure proper cluster access control.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication Select the authentication method to use for the API request, 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 The HTTP method used for the API request, defaulting to POST for this operation.
Path Parameters Parameters included in the request path, specifically the project ID or URL-encoded path required to identify the project for which the cluster user is being added.

Output

JSON

  • response - The JSON response from the GitLab API after adding the user cluster to the project, typically including details about the cluster user association.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided API credentials.
  • Verify that the API token has sufficient permissions to manage clusters for the specified project.
  • Check the base URL to confirm it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common errors include authentication failures (401 Unauthorized) and resource not found (404) if the project ID is invalid or the user lacks access.

Links

Discussion