GitLab API icon

GitLab API

Gitlab

Actions917

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 restrict a user's access to a GitLab instance, for example, to prevent a user from logging in or accessing projects. The node sends a POST request to the endpoint `/api/v4/users/{id}/block` where `{id}` is the user ID to be blocked.

Use Case Examples

  1. Blocking a user by their ID to prevent access to the GitLab instance.
  2. Automating user management by blocking users who no longer require access.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, typically an API key or token for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, which is POST for blocking a user.
Path Parameters The path parameters for the request, specifically the user ID to block.

Output

JSON

  • id - The ID of the blocked user.
  • username - The username of the blocked user.
  • state - The state of the user after blocking, typically 'blocked'.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the API authentication token has 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 authentication token lacks permissions.

Links

Discussion