GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a specific deploy token from a GitLab project using the GitLab API. It is useful for automation workflows where you need to programmatically access deploy tokens associated with a project, for example, to verify token details or manage deployment credentials securely.

Use Case Examples

  1. Fetch deploy token details for a project to audit or verify token permissions.
  2. Integrate with CI/CD pipelines to dynamically retrieve deploy token information before deployment.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public endpoints or testing.
Authentication Type of authentication used, here it is 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.
Parameter Schema Defines the required path parameters for the API call, including project ID and deploy token ID.
Request Body Schema Schema for the request body, not used in this GET operation.
Request Path API endpoint path template for retrieving a deploy token by project ID and token ID.
Path Parameters Collection of path parameters including 'id' (project ID or URL-encoded path) and 'token_id' (deploy token ID) required for the API call.

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.
  • expires_at - The expiration date of the deploy token, if set.
  • scopes - The scopes or permissions granted to the deploy token.

Dependencies

  • GitLab API credentials for authentication

Troubleshooting

  • Ensure the project ID and deploy token ID are correct and accessible by the authenticated user.
  • Check that the GitLab API credentials are valid and have sufficient permissions to access deploy tokens.
  • If skipping authentication, verify that the endpoint supports unauthenticated access, otherwise the request will fail.
  • Common error messages include 404 Not Found if the project or token does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion