GitLab API

GitlabTool

Actions1000

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 programmatically deactivate user accounts in their GitLab instance, for example, when managing user access or automating user lifecycle management.

Use Case Examples

  1. Deactivate a user by specifying their user ID to restrict their access to the GitLab instance.
  2. Automate user deactivation as part of an offboarding workflow.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication Specifies the authentication method to use for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, defaulting to GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters The path parameters for the API request, specifically the user ID to deactivate.

Output

JSON

  • id - The ID of the user that was deactivated
  • state - The state of the user after deactivation, typically 'deactivated'

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 used for authentication has sufficient permissions to deactivate users.
  • Check the base URL to confirm 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 API key lacks permissions.

Links

Discussion