GitLab API

GitlabTool

Actions905

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 key or configuration value defined as a group variable in GitLab.

Use Case Examples

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

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method HTTP method used for the API request, defaulting to GET.
Path Parameters Parameters used in the API request path to specify the group ID and the variable key to retrieve.

Output

JSON

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

Dependencies

  • GitLab API key credential for authentication

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.
  • If skipping authentication, verify that the GitLab instance allows unauthenticated access to group variables, which is uncommon.
  • Common error messages include 404 Not Found if the group or variable key does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion