GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows sharing a specific 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 GitLab 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 Determines whether to skip the authentication process for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to specify the project ID in the request path for identifying the project to share.

Output

JSON

  • id - The ID or URL-encoded path of the project to be shared.
  • shareDetails - Details of the sharing operation including user or group and access level.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the authentication credentials are valid and have sufficient permissions to share the project.
  • 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 failure), 404 Not Found (invalid project ID), and 403 Forbidden (insufficient permissions). Resolving these involves correcting credentials, project ID, or user permissions.

Links

Discussion