GitLab API icon

GitLab API

Gitlab

Actions880

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 want to restrict a user's access by banning them based on their user ID. For example, an admin can automate banning users who violate policies by specifying their user ID.

Use Case Examples

  1. Ban a user with ID 123 by sending a POST request to `/api/v4/users/123/ban`.
  2. Automate banning users in GitLab as part of a workflow triggered by certain events.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, default is false.
Authentication Type of authentication used, default is GitLab API key, hidden if Skip Authentication is true.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET. For this operation, POST is used.
Path Parameters Parameters to be included in the request path, specifically the user ID to ban.

Output

JSON

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

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the user ID provided in path parameters is valid and exists in GitLab.
  • Check that the GitLab API key credential has sufficient permissions to ban users.
  • If Skip Authentication is true, the request may fail due to lack of authorization.
  • Verify the baseUrl is correct and accessible.
  • 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