GitLab API

GitlabTool

Actions1000

Overview

This node operation blocks a user in GitLab by sending a POST request to the GitLab API endpoint `/api/v4/users/{id}/block`. It is useful for administrators who want to restrict access for specific users by blocking their accounts. For example, an admin can automate blocking users who violate policies or are no longer part of the organization.

Use Case Examples

  1. Blocking a user by their user ID to prevent them from accessing GitLab resources.
  2. Automating user management workflows by integrating user blocking into an admin dashboard.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is POST for this operation.
Path Parameters Parameters to be included in the request path, specifically the user ID to block.

Output

JSON

  • id - The ID of the user who was blocked.
  • state - The state of the user account after blocking (e.g., blocked).
  • message - Any message returned by the API regarding the block operation.

Dependencies

  • GitLab API authentication credentials

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the API credentials have sufficient permissions to block users.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the user ID does not exist, and 403 Forbidden if the credentials lack permissions.

Links

Discussion