GitLab API icon

GitLab API

Gitlab

Actions880

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 or integration tasks involving deployment credentials.

Use Case Examples

  1. Get details of a deploy token by specifying the project ID and the token ID to manage deployment access 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, defaulting to GET.
Path Parameters Parameters for the API path including the project ID and the deploy token ID to specify the resource to retrieve.

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 deploy token ID are correctly specified and exist in the GitLab instance.
  • Verify that the API key credential has sufficient permissions to access deploy tokens for the project.
  • 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