GitLab API

GitlabTool

Actions1000

Overview

This node operation allows creating impersonation tokens for a specific user in GitLab via the GitLab API. It is useful for administrators who need to generate tokens that can act on behalf of a user, enabling automation or delegated access without requiring the user's password. For example, it can be used to automate tasks or integrate with other systems securely by impersonating a user.

Use Case Examples

  1. Creating an impersonation token for a user to automate GitLab actions on their behalf.
  2. Generating a token to allow a CI/CD system to perform actions as a specific user.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, default is false.
Authentication Authentication method used, hidden unless Skip Authentication is false.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters to be included in the request path, specifically the user_id of the user for whom the impersonation token is created.

Output

JSON

  • token - The impersonation token created for the user.
  • name - Name of the impersonation token.
  • expires_at - Expiration date of the impersonation token.
  • scopes - Scopes or permissions granted to the impersonation token.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the user_id path parameter is correctly provided and valid; otherwise, the API will return an error.
  • Authentication errors may occur if the GitLab API credential is missing or invalid; verify the credential configuration.
  • Check that the baseUrl is correctly set to the GitLab instance URL if using a self-hosted GitLab server.
  • The impersonation token creation may fail if the authenticated user does not have sufficient permissions to create tokens for the specified user.

Links

Discussion