GitLab API

GitlabTool

Actions1000

Overview

This node operation allows sharing a GitLab project with a user or group by sending a POST request to the GitLab API endpoint `/api/v4/projects/{id}/share`. It is useful for automating project sharing tasks, such as granting access permissions to collaborators programmatically.

Use Case Examples

  1. Automatically share a project with a new team member by specifying the project ID and sharing details.
  2. Integrate project sharing into a CI/CD pipeline to manage access control dynamically.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API access.
Authentication Type of authentication used for the API request, 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 POST for sharing the project.
Path Parameters Parameters to specify the project ID in the API path.

Output

JSON

  • id - The ID or URL-encoded path of the project to be shared
  • shareDetails - Details of the sharing configuration sent in the request body, such as user or group access permissions

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID is correctly specified and URL-encoded if necessary to avoid 404 errors.
  • Verify that the API key has sufficient permissions to share projects to avoid authorization errors.
  • Check the request body schema matches the expected format to prevent validation errors from the API.

Links

Discussion