GitLab API

GitlabTool

Actions1000

Overview

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

Use Case Examples

  1. Automatically add a user cluster to a GitLab project as part of a CI/CD pipeline.
  2. Manage user clusters across multiple GitLab projects via automation workflows.

Properties

Name Meaning
Skip Authentication Option to skip API authentication for the request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters to be included in the request path, specifically the project ID or URL-encoded path.

Output

JSON

  • response - The JSON response from the GitLab API after adding or managing the user cluster in the project.

Dependencies

  • GitLab API authentication (an API key credential)

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 in the specified GitLab project.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common errors include authentication failures, permission denied errors, and invalid project ID errors. These can be resolved by verifying credentials, permissions, and input parameters.

Links

Discussion