GitLab API

GitlabTool

Actions905

Overview

This node operation deactivates a user in GitLab by sending a POST request to the GitLab API endpoint `/api/v4/users/{id}/deactivate`. It is useful for administrators who want to disable user accounts programmatically without deleting them. For example, it can be used in automated workflows to deactivate users who no longer require access or have left an organization.

Use Case Examples

  1. Deactivate a user by specifying their user ID to prevent them from accessing GitLab services.
  2. Automate user management by integrating this node in workflows that handle user lifecycle events.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to POST.
Path Parameters The path parameters for the request, specifically the user ID to deactivate.

Output

JSON

  • id - The ID of the deactivated user.
  • username - The username of the deactivated user.
  • state - The state of the user account after deactivation, typically 'deactivated'.
  • message - Any message returned by the API regarding the deactivation status.

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.
  • Verify that the API key used has sufficient permissions to deactivate users.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • If skipping authentication, the request will likely fail unless the GitLab instance allows anonymous deactivation (rare).

Links

Discussion