GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves impersonation tokens for a specific user in GitLab via the GitLab API. It is useful for administrators or automation workflows that need to manage or audit user impersonation tokens, which allow acting on behalf of a user. For example, it can be used to list all active or inactive impersonation tokens for a user to ensure security compliance or to automate token management.

Use Case Examples

  1. Retrieve all impersonation tokens for user ID 123 to audit active tokens.
  2. Fetch only active impersonation tokens for a user to monitor currently valid tokens.

Properties

Name Meaning
Skip Authentication If true, the node will skip authentication when making the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, default is GET.
Query Parameters Optional query parameters to control pagination and filtering of impersonation tokens.
Path Parameters Path parameters specifying the user ID for whom impersonation tokens are retrieved.

Output

JSON

  • impersonation_tokens - Array of impersonation token objects for the specified user, including details such as token state, creation date, and expiration.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the user_id path parameter is provided and valid; missing or invalid user_id will cause API errors.
  • Check that the GitLab API key credential has sufficient permissions to access user impersonation tokens.
  • Verify the baseUrl is correct for the GitLab instance being accessed, especially if using a self-hosted GitLab.
  • If pagination parameters (page, per_page) are used, ensure they are valid integers to avoid request errors.

Links

Discussion