GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves a specific variable from a GitLab group using the GitLab API v4. It is useful for automating workflows that require accessing group-level variables, such as CI/CD pipeline configurations or environment settings stored in GitLab groups. For example, it can be used to fetch a secret or configuration value by its key from a particular group.

Use Case Examples

  1. Fetch a CI/CD variable by key from a GitLab group to use in an automation workflow.
  2. Retrieve environment-specific variables stored in a GitLab group for deployment scripts.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters for the API path, including group ID and variable key.

Output

JSON

  • id - The ID or path of the GitLab group.
  • key - The key of the variable retrieved.
  • value - The value of the variable retrieved.
  • variable details - Additional details about the variable as returned by the GitLab API.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID and variable key are correctly specified and URL-encoded if necessary.
  • Verify that the API key has sufficient permissions to access group variables.
  • Check the base URL if using a self-hosted GitLab instance instead of gitlab.com.
  • Common errors include 404 Not Found if the group or variable key does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion