GitLab API

GitlabTool

Actions905

Overview

This node operation allows creating a new access token for a specific project in GitLab via the GitLab API. It is useful for automating the management of project access tokens, enabling secure and programmatic access to project resources. For example, it can be used in CI/CD pipelines to generate tokens dynamically for deployment or integration purposes.

Use Case Examples

  1. Create a new access token for a GitLab project to allow automated scripts to interact with the project repository.
  2. Generate project access tokens programmatically to manage permissions without manual intervention in the GitLab UI.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or public endpoints.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The 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.
Path Parameters Parameters to be included in the request path, specifically the project ID for this operation.

Output

JSON

  • id - The unique identifier of the created access token.
  • name - The name of the access token.
  • token - The actual access token string used for authentication.
  • scopes - The scopes or permissions granted to the access token.
  • created_at - Timestamp when the access token was created.

Dependencies

  • Requires GitLab API key credential for authentication.

Troubleshooting

  • Ensure the project ID path parameter is correctly provided and valid; otherwise, the API will return an error.
  • Authentication errors may occur if the GitLab API key is missing, invalid, or lacks sufficient permissions.
  • The access token creation may fail if required fields in the request body are missing or malformed.

Links

Discussion