GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves deploy tokens from the GitLab API (version 4). It is useful for automating the management and retrieval of deploy tokens, which are used for authentication in deployment processes. For example, it can be used to list active deploy tokens with pagination support, helping DevOps teams manage access tokens programmatically.

Use Case Examples

  1. Retrieve the first page of active deploy tokens with 20 tokens per page.
  2. Fetch deploy tokens without filtering by active status, useful for auditing all tokens.

Properties

Name Meaning
Skip Authentication If true, the node skips authentication for the request.
Authentication The authentication method used, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method HTTP method used for the request, default is GET.
Query Parameters Optional query parameters to filter and paginate the deploy tokens list.

Output

JSON

  • ``
    • id - Unique identifier of the deploy token
    • name - Name of the deploy token
    • username - Username associated with the deploy token
    • expires_at - Expiration date of the deploy token
    • scopes - Permissions granted to the deploy token
    • active - Indicates if the deploy token is active

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has sufficient permissions to access deploy tokens.
  • Verify the baseUrl is correct and accessible from the n8n instance.
  • Check query parameters for correct types and values, especially 'active' which should be a boolean.
  • Common error messages include authentication failures (401 Unauthorized) and resource not found (404) if the path or base URL is incorrect.

Links

Discussion