GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes a member from a specified GitLab group using the GitLab API. It is useful for managing group memberships programmatically, such as removing users who no longer need access to a group. For example, an admin can automate the removal of users from project groups when they leave a team or organization.

Use Case Examples

  1. Remove a user from a GitLab group by specifying the group ID and user ID.
  2. Skip deleting memberships in subgroups and projects by setting the 'skip_subresources' flag.
  3. Unassign the removed member from issues or merge requests by setting the 'unassign_issuables' flag.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to GET but DELETE is used for this operation.
Parameter Schema Defines the required and optional parameters for the API call, including group ID, user ID, and optional query flags to control deletion behavior.
Query Parameters Optional query parameters to control deletion behavior: 'skip_subresources' to skip deleting memberships in subgroups and projects, and 'unassign_issuables' to unassign the user from issues or merge requests.
Path Parameters Path parameters specifying the group ID and user ID to identify the member to delete.

Output

JSON

  • id - The ID of the group from which the member was removed.
  • user_id - The ID of the user who was removed from the group.
  • status - The status or result of the delete operation, typically indicating success or failure.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID and user ID are correct and exist in GitLab; otherwise, the API will return an error.
  • Check that the API key has sufficient permissions to remove members from the group.
  • If 'skip_subresources' or 'unassign_issuables' flags are used, verify their boolean values are correctly formatted as strings ('true' or 'false').
  • Common error messages include '404 Not Found' if the group or user does not exist, and '403 Forbidden' if the API key lacks permissions.

Links

Discussion