GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to block a user by their user ID. It is useful in scenarios where an administrator needs to programmatically block a user account on a GitLab instance, for example, to restrict access due to policy violations or security concerns.

Use Case Examples

  1. Blocking a user with ID 123 on the GitLab.com instance by sending a POST request to /api/v4/users/123/block.
  2. Automating user management workflows by integrating this node to block users based on certain triggers or conditions.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the request, defaulting to POST for this operation.
Path Parameters The path parameters for the API request, specifically the user ID to block.

Output

JSON

  • id - The ID of the user that was blocked.
  • message - Response message or status from the API after blocking the user.

Dependencies

  • GitLab API key credential

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 block users.
  • Check the baseUrl to ensure it points to the correct GitLab instance.
  • Common error messages include authentication failures (due to invalid or missing API key) and 404 errors if the user ID does not exist.

Links

Discussion