GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves a specific deploy token from a GitLab project using the GitLab API. It is useful for scenarios where you need to access or verify details of a deploy token associated with a project, such as for automation, auditing, or integration purposes.

Use Case Examples

  1. Fetch details of a deploy token by providing the project ID and the token ID to manage deployment credentials programmatically.
  2. Verify the existence and properties of a deploy token before using it in a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated access scenarios.
Authentication Select the authentication method, 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, defaulting to GET.
Path Parameters Parameters to specify the project ID and deploy token ID for the API request.

Output

JSON

  • id - The unique identifier of the deploy token.
  • name - The name of the deploy token.
  • username - The username associated with the deploy token.
  • scopes - The scopes or permissions granted to the deploy token.
  • created_at - The creation timestamp of the deploy token.
  • expires_at - The expiration date of the deploy token, if any.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and token ID are correctly specified and exist in the GitLab instance.
  • Verify that the API key used for authentication has sufficient permissions to access deploy tokens.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the deploy token or project does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion