GitLab API

GitlabTool

Actions1095

Ci_variables → putApiV4GroupsIdVariablesKey

AI-generated

Summary

Update a GitLab CI/CD variable for a specific group by providing the group ID and variable key along with the new variable details in the request body.

Inputs

  • id (required) — The ID or URL-encoded path of the group owned by the authenticated user whose CI variable will be updated.
  • key (required) — The key of the CI variable to update.
  • putApiV4GroupsIdVariablesKey (required) — An object containing the new properties for the variable to be updated (such as variable value, protected status, masked status, etc.).
  • baseUrl — Optional base URL for GitLab instance; defaults to https://gitlab.com.
  • skipAuthentication — Whether to skip authentication; defaults to false.

Output shape

a JSON object representing the updated CI variable details as returned by the GitLab API

The operation performs an HTTP PUT request to the endpoint /api/v4/groups/{id}/variables/{key}. Requires authentication unless explicitly skipped.

Examples

Example 1: Update group CI variable value

Provide group ID, variable key, and request body with updated variable value and optionally other attributes.

Links

Discussion