GitLab API icon

GitLab API

Gitlab

Actions1062

Ci_variables → putApiV4ProjectsIdVariablesKey

AI-generated

Summary

Update a specific CI/CD variable for a given GitLab project by its project ID (or NAMESPACE/PROJECT_NAME) and variable key.

Inputs

  • id (required) — The ID of the GitLab project or its URL-encoded NAMESPACE/PROJECT_NAME owned by the authenticated user.
  • key (required) — The key of the CI/CD variable to update.
  • putApiV4ProjectsIdVariablesKey (required) — The request body containing the updated properties for the variable as defined in the GitLab API schema.
  • skipAuthentication — Optional flag to skip authentication (default is false).
  • baseUrl — Override the base URL of the GitLab instance, defaults to https://gitlab.com.

Output shape

a single JSON object representing the updated CI/CD variable

The output will contain the updated variable details as returned by the GitLab API. Authentication is required unless explicitly skipped. The operation uses HTTP PUT to the endpoint /api/v4/projects/{id}/variables/{key}.

Examples

Example 1: Update CI/CD variable 'MY_VAR' for project with ID 123456

Set 'id' to '123456', 'key' to 'MY_VAR', and populate 'putApiV4ProjectsIdVariablesKey' with the desired variable value and options.

Links

Discussion