GitLab API

GitlabTool

Actions905

Overview

This node operation allows sending invitations to a GitLab project by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/invitations`. It is useful for automating the process of inviting users to collaborate on a specific project in GitLab. For example, it can be used in workflows that manage project access or onboarding new team members by programmatically sending invitations.

Use Case Examples

  1. Automatically invite a user to a GitLab project when a new team member is added in an HR system.
  2. Send invitations to multiple users to join a GitLab project as part of a project setup automation.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request (boolean). Defaults to false.
Authentication The authentication method used 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. Defaults to https://gitlab.com.
Method The HTTP method used for the API request. For this operation, it is POST.
Path Parameters Parameters included in the request path, specifically the project ID (`id`) to which the invitation is sent.

Output

JSON

  • id - The ID of the invitation created.
  • email - The email address of the invited user.
  • access_level - The access level granted to the invited user.
  • created_at - Timestamp when the invitation was created.
  • invited_by - Information about the user who sent the invitation.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID (`id`) path parameter is correctly set and corresponds to an existing project in GitLab.
  • Verify that the API key used for authentication has sufficient permissions to send invitations to the project.
  • Check the request body schema to ensure all required fields for the invitation are provided and correctly formatted.
  • Common error messages include 401 Unauthorized (authentication failure), 404 Not Found (invalid project ID), and 400 Bad Request (invalid request body). Resolving these involves verifying credentials, project existence, and request payload respectively.

Links

Discussion