GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows banning a user in GitLab by sending a POST request to the GitLab API endpoint `/api/v4/users/{id}/ban`. It is useful for administrators who need to restrict access for specific users by banning them through automation workflows. For example, it can be used to automatically ban users who violate policies or terms of service.

Use Case Examples

  1. Automatically ban a user by their user ID when certain conditions are met in a workflow.
  2. Integrate with a user management system to ban users in GitLab based on external triggers.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication The authentication method used for the request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to POST.
Path Parameters The path parameter 'id' specifying the user ID to ban.

Output

JSON

  • id - The ID of the banned user returned by the API.
  • message - Response message or status from the ban operation.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the API key credential has sufficient permissions to ban users.
  • Check the baseUrl is correctly set to the GitLab instance URL if using a self-hosted GitLab.
  • Common error messages include 404 Not Found if the user ID does not exist, and 403 Forbidden if the API key lacks permissions.

Links

Discussion