GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves a specific deploy token from a GitLab group using the GitLab API. It is useful for scenarios where you need to access or verify deploy tokens associated with a group, such as for automation, deployment pipelines, or security audits.

Use Case Examples

  1. Fetch details of a deploy token by providing the group 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 endpoints.
Authentication Type of authentication to use, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters to specify the group 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 group ID and deploy token ID are correctly provided and exist in the GitLab instance.
  • Verify that the API key used for authentication has sufficient permissions to access group deploy tokens.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 404 Not Found if the deploy token or group does not exist, and 401 Unauthorized if authentication fails. Verify credentials and permissions to resolve these issues.

Links

Discussion