GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves variables for a specific project from the GitLab API (v4). It is useful for automating the management and retrieval of project-level CI/CD variables in GitLab, enabling workflows that depend on dynamic configuration or secrets stored in GitLab projects. For example, it can be used to fetch environment variables before running deployment pipelines or to audit project variables programmatically.

Use Case Examples

  1. Fetch all CI/CD variables for a project identified by its ID or namespace/project name.
  2. Paginate through project variables using 'page' and 'per_page' query parameters to handle large sets of variables.

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 authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters for pagination: 'page' for current page number and 'per_page' for number of items per page.
Path Parameters Path parameter 'id' specifying the project ID or URL-encoded namespace/project name to identify the project.

Output

JSON

  • variables - List of variables retrieved from the specified GitLab project.

Dependencies

  • GitLab API authentication credentials

Troubleshooting

  • Ensure the project ID or namespace/project name is correctly specified in the path parameters; otherwise, the API will return an error.
  • Check that the GitLab API credentials are valid and have sufficient permissions to access the project's variables.
  • If pagination parameters are used, verify that 'page' and 'per_page' are valid integers to avoid request errors.

Links

Discussion