GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves variables for a specific group in GitLab using the GitLab API v4. It is useful for automating the management and retrieval of group-level CI/CD variables in GitLab projects. For example, it can be used to fetch environment variables configured for a group to use in CI pipelines or to audit variable settings across groups.

Use Case Examples

  1. Fetch all CI variables for a GitLab group by specifying the group ID.
  2. Paginate through group variables by setting 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 or unauthenticated access.
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.
Parameter Schema Defines the parameters for the API call including path and query parameters such as group ID, page number, and items per page.
Request Path API endpoint path template for fetching group variables, with a placeholder for group ID.
Query Parameters Optional query parameters to control pagination: page number and items per page.
Path Parameters Path parameter specifying the group ID or URL-encoded path of the group.

Output

JSON

  • variables - Array of variables associated with the specified GitLab group, including details like key, value, and environment scope.

Dependencies

  • GitLab API credentials for authentication

Troubleshooting

  • Ensure the group ID provided in path parameters is correct and accessible by the authenticated user.
  • Check that the GitLab API credentials are valid and have sufficient permissions to access group variables.
  • If pagination parameters are used, verify that page and per_page values are within valid ranges to avoid empty or incomplete results.
  • Common error messages include 401 Unauthorized (invalid or missing credentials), 404 Not Found (group ID does not exist or is inaccessible), and 400 Bad Request (invalid parameters). Resolving these involves correcting credentials, verifying group ID, and ensuring parameter formats are correct.

Links

Discussion