GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to add or manage a user cluster within a specific group in GitLab by making a POST request to the GitLab API endpoint `/api/v4/groups/{id}/clusters/user`. It is useful for automating cluster user management in GitLab groups, such as adding a user cluster to a group programmatically.

Use Case Examples

  1. Automatically add a user cluster to a GitLab group when a new project is created.
  2. Manage user clusters in GitLab groups as part of a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used for the request, defaulting to 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 but can be POST, PUT, DELETE, HEAD, PATCH.
Path Parameters Parameters to be included in the request path, specifically the group ID for this operation.

Output

JSON

  • id - The ID of the group where the cluster user is added.
  • clusterUserDetails - Details of the user cluster added to the group.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the group ID provided in the path parameters is valid and exists in GitLab.
  • Verify that the authentication credentials (GitLab API key) are correctly configured and have sufficient permissions to manage clusters in the group.
  • Check the base URL to ensure it points to the correct GitLab instance if using a self-hosted GitLab server.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (invalid group ID), and 403 Forbidden (insufficient permissions). Resolving these involves verifying credentials, group ID, and user permissions.

Links

Discussion