GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to ban a user by their user ID. It is useful in scenarios where an administrator needs to restrict a user's access to a GitLab instance by banning them programmatically. For example, automating user management workflows in a DevOps environment or integrating user ban actions into a larger administrative automation process.

Use Case Examples

  1. Ban a user by their ID to prevent access to the GitLab instance.
  2. Automate user management by banning users based on specific criteria or events.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used for the request, default is GitLab API key.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method HTTP method used for the request, default is GET but POST is used for banning a user.
Parameter Schema Schema defining the path parameter 'id' which is the user ID to ban.
Request Body Schema Schema for the request body, not used in this operation.
Request Path The API endpoint path for banning a user, with a placeholder for user ID.
Path Parameters Collection of path parameters, specifically the 'id' of the user to ban.

Output

JSON

  • id - The ID of the banned user.
  • username - The username of the banned user.
  • state - The state of the user after banning, typically 'banned'.
  • message - Response message confirming the ban action.

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.
  • Check that the API key credential has sufficient permissions to ban users.
  • Verify the base URL is correct and accessible.
  • Common error: 404 Not Found - The user ID does not exist.
  • Common error: 401 Unauthorized - Authentication failed or API key is invalid.
  • Common error: 403 Forbidden - Insufficient permissions to ban the user.

Links

Discussion