GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation unbans a user in GitLab by sending a POST request to the GitLab API endpoint `/api/v4/users/{id}/unban`. It is useful in scenarios where an administrator needs to restore access for a previously banned user by specifying the user's ID.

Use Case Examples

  1. An admin wants to unban a user with ID 12345 to allow them to access the GitLab instance again.
  2. Automating user management workflows where banned users are reinstated based on certain conditions.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or public endpoints.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, default is 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 unban.

Output

JSON

  • id - The ID of the unbanned user returned by the GitLab API.
  • username - The username of the unbanned user.
  • name - The full name of the unbanned user.
  • state - The state of the user, expected to be 'active' after unbanning.
  • created_at - Timestamp when the user was created.
  • bio - The biography of the user.
  • location - The location of the user.
  • public_email - The public email address of the user.
  • skype - The Skype contact of the user.
  • linkedin - The LinkedIn profile of the user.
  • twitter - The Twitter handle of the user.
  • website_url - The website URL of the user.
  • organization - The organization the user belongs to.
  • last_sign_in_at - Timestamp of the user's last sign-in.
  • confirmed_at - Timestamp when the user was confirmed.
  • last_activity_on - Date of the user's last activity.
  • email - The email address of the user.
  • theme_id - The theme ID set by the user.
  • color_scheme_id - The color scheme ID set by the user.
  • projects_limit - The limit on the number of projects the user can create.
  • current_sign_in_at - Timestamp of the current sign-in.
  • identities - List of identities associated with the user.
  • can_create_group - Boolean indicating if the user can create groups.
  • can_create_project - Boolean indicating if the user can create projects.
  • two_factor_enabled - Boolean indicating if two-factor authentication is enabled.
  • external - Boolean indicating if the user is external.
  • private_profile - Boolean indicating if the user's profile is private.
  • is_admin - Boolean indicating if the user has admin privileges.
  • note - Any note associated with the user.

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 unban users.
  • If the request fails, 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 API key lacks permissions.

Links

Discussion