GitLab API

GitlabTool

Actions1000

Overview

This node operation creates a new access token for a specific project in GitLab. It is useful for automating the management of project access tokens, enabling secure and controlled access to project resources via API. For example, it can be used to programmatically generate tokens for CI/CD pipelines or external integrations that require project-level permissions.

Use Case Examples

  1. Automate creation of project access tokens for CI/CD pipelines.
  2. Generate access tokens for external tools to interact with a GitLab project securely.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key.
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 project ID for this operation.

Output

JSON

  • id - The ID of the created access token.
  • name - The name of the access token.
  • token - The actual access token string.
  • scopes - The scopes or permissions granted by the access token.
  • created_at - Timestamp when the access token was created.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and the project exists.
  • Verify that the GitLab API key credential has sufficient permissions to create project access tokens.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error: 401 Unauthorized - indicates authentication failure; verify API key and authentication settings.
  • Common error: 404 Not Found - indicates the project ID does not exist or is inaccessible.

Links

Discussion