GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves CI/CD variables for a specific GitLab group using the GitLab API. It is useful for automating the management and retrieval of group-level CI variables in GitLab projects, enabling workflows that depend on dynamic configuration or secrets stored in GitLab groups.

Use Case Examples

  1. Fetch all CI variables for a GitLab group by specifying the group ID to use them in a deployment pipeline.
  2. Automate auditing or backup of CI variables for groups in GitLab by retrieving them programmatically.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API access.
Authentication Selects the authentication method, defaulting to GitLab API key authentication. Hidden if Skip Authentication is true.
baseUrl Base URL of the GitLab instance to send the API request to, defaulting to https://gitlab.com.
Method HTTP method to use for the API request, defaulting to GET.
Query Parameters Optional query parameters for pagination: page number and items per page.
Path Parameters Path parameter specifying the group ID or URL-encoded path of the group whose CI variables are to be retrieved.

Output

JSON

  • id - The unique identifier of the CI variable.
  • key - The key/name of the CI variable.
  • value - The value of the CI variable.
  • variable_type - The type of the CI variable (e.g., env_var, file).
  • protected - Indicates if the variable is protected.
  • masked - Indicates if the variable is masked.
  • environment_scope - The environment scope where the variable is applied.
  • created_at - Timestamp when the variable was created.
  • updated_at - Timestamp when the variable was last updated.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the group ID or path provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to read group CI variables.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the API endpoint is reachable.
  • Common error messages include 401 Unauthorized (invalid or missing authentication), 404 Not Found (group ID/path does not exist), and 403 Forbidden (insufficient permissions). Resolving these involves correcting credentials, permissions, or parameters.

Links

Discussion