GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows approving a user in GitLab by sending a POST request to the endpoint `/api/v4/users/{id}/approve`. It is useful in scenarios where an administrator needs to programmatically approve a user account by specifying the user's ID. For example, automating user approval workflows in GitLab user management.

Use Case Examples

  1. Approve a newly registered user by their user ID to enable their access automatically.
  2. Integrate with a user onboarding system to approve users in GitLab after verification.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl 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 Parameters to be included in the request path, specifically the user ID to approve.

Output

JSON

  • id - The ID of the approved user.
  • username - The username of the approved user.
  • name - The full name of the approved user.
  • state - The state of the user after approval, typically 'active'.
  • created_at - Timestamp when the user was created.
  • email - Email address of the approved user.
  • web_url - URL to the user's GitLab profile.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • Check that the API key credential has sufficient permissions to approve users.
  • If skipping authentication, verify that the GitLab instance allows unauthenticated requests for this operation, which is uncommon.
  • 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