GitLab API icon

GitLab API

Gitlab

Actions880

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. Creating a new access token for a GitLab project to allow automated deployment scripts to access the project repository.
  2. Generating a project access token to integrate with third-party tools that need to interact with the project.

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, default is 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 which the access token is created.

Output

JSON

  • id - The unique identifier of the created access token.
  • name - The name assigned to 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

  • GitLab API key credential for authentication

Troubleshooting

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

Links

Discussion