GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to create impersonation tokens for a specified user. It is useful in scenarios where an administrator or automation process needs to generate tokens that allow acting on behalf of a user without requiring their credentials. For example, it can be used to automate user access management or to perform actions programmatically as a user in GitLab.

Use Case Examples

  1. Creating an impersonation token for a user to automate CI/CD pipeline triggers.
  2. Generating tokens for temporary access to user resources in GitLab.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, 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 to use for the API request, defaulting to POST for this operation.
Path Parameters Parameters included in the API request path, specifically the user ID for whom the impersonation token is created.

Output

JSON

  • token - The impersonation token created for the user.
  • name - The name assigned to the impersonation token.
  • expires_at - The expiration date of the impersonation token.
  • scopes - The scopes or permissions granted to the impersonation token.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and the user exists in GitLab.
  • Verify that the API key used for authentication has sufficient permissions to create impersonation tokens.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include authentication failures, invalid user ID, or insufficient permissions. Resolving these typically involves verifying credentials, user existence, and API permissions.

Links

Discussion