GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves a specific CI/CD variable from a GitLab group using the GitLab API. It is useful for automation workflows that need to access or manage group-level CI/CD variables programmatically, such as fetching environment variables for deployment pipelines or configuration management.

Use Case Examples

  1. Fetch a CI/CD variable by its key from a specific GitLab group to use its value in subsequent workflow steps.
  2. Automate the retrieval of sensitive group variables for auditing or reporting purposes.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API calls.
Authentication Select the authentication method, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, defaulting to GET.
Path Parameters Parameters to specify the group ID and the variable key to retrieve.

Output

JSON

  • id - The ID of the GitLab group.
  • key - The key of the CI/CD variable.
  • value - The value of the CI/CD variable.
  • variable_type - The type of the variable (e.g., env_var).
  • protected - Indicates if the variable is protected.
  • masked - Indicates if the variable is masked.
  • environment_scope - The environment scope where the variable is applied.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the provided group ID and variable key are correct and accessible by the authenticated user.
  • Check that the GitLab API key credential has sufficient permissions to read group variables.
  • Verify the base URL is correct if using a self-hosted GitLab instance.
  • If skipping authentication, ensure the API endpoint allows unauthenticated access, otherwise the request will fail.

Links

Discussion