GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows blocking a user on 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 block a user by specifying the user's ID, effectively preventing that user from accessing the GitLab instance.

Use Case Examples

  1. Blocking a user by their user ID to prevent access to the GitLab instance.
  2. Automating user management by integrating user blocking into workflows.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or when authentication is handled externally.
Authentication Specifies the authentication method to use, defaulting to GitLab API credentials. Hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Collection of path parameters required for the request, specifically the user ID to block.

Output

JSON

  • id - The ID of the user that was blocked.
  • state - The state of the user after the block operation, typically 'blocked'.
  • message - Any message returned by the API regarding the block operation.

Dependencies

  • GitLab API credentials for authentication

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • Check that the API credentials have sufficient permissions to block users.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated requests for this operation, otherwise it will fail.
  • Common error messages include '404 Not Found' if the user ID does not exist, and '403 Forbidden' if the credentials lack permission to block users.

Links

Discussion