GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows creating personal access tokens for a user in GitLab via the GitLab API. It is useful for automating the generation of tokens that can be used for authentication in GitLab, enabling programmatic access to GitLab resources without using a password. For example, it can be used in CI/CD pipelines or automation scripts to generate tokens with specific scopes.

Use Case Examples

  1. Creating a personal access token for a user to enable API access in automation workflows.
  2. Automating token creation for users in a GitLab instance to manage access programmatically.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, hidden unless Skip Authentication is false.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Parameter Schema Schema defining the parameters for the POST request to create a personal access token.
Request Body Schema Schema defining the structure of the request body for creating a personal access token.
Request Path API endpoint path for creating personal access tokens: /api/v4/user/personal_access_tokens.

Output

JSON

  • id - ID of the created personal access token.
  • name - Name of the personal access token.
  • scopes - Scopes assigned to the personal access token.
  • created_at - Timestamp when the token was created.
  • expires_at - Expiration date of the token.
  • token - The actual personal access token string used for authentication.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the authentication credentials are valid and have permission to create personal access tokens.
  • Verify the baseUrl is correct and accessible.
  • Check that the request body conforms to the required schema for creating personal access tokens.
  • Common errors include authentication failures, invalid request body, or insufficient permissions.

Links

Discussion