GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation updates a specific CI variable for a GitLab group using the GitLab API. It is useful for automating the management of group-level CI/CD variables, such as updating secrets or configuration values for pipelines. For example, a DevOps engineer can use this node to programmatically update environment variables for a group in GitLab without manually accessing the GitLab UI.

Use Case Examples

  1. Updating a CI variable 'API_KEY' for a GitLab group with ID '12345' to a new value via the API.
  2. Automating the rotation of secrets stored as group CI variables in GitLab.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to PUT for this operation.
Path Parameters Parameters for the API path, including the group ID and the variable key to update.

Output

JSON

  • response - The JSON response from the GitLab API after updating the group variable.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID and variable key are correct and exist in the GitLab instance.
  • Verify that the API key used has sufficient permissions to update group variables.
  • Check the base URL is correct if using a self-hosted GitLab instance.
  • Common errors include authentication failures, 404 not found if the group or variable does not exist, and 400 bad request if the request body is malformed.

Links

Discussion