GitLab API

GitlabTool

Actions1095

Ci_variables → getApiV4GroupsIdVariablesKey

AI-generated

Summary

Retrieve a specific CI/CD variable by its key from a GitLab group identified by ID or path.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab group owned by the authenticated user.
  • key (required) — The key name of the CI/CD variable to retrieve.
  • skipAuthentication — Optionally skip authentication if set to true.
  • baseUrl — The base URL of the GitLab instance, defaults to 'https://gitlab.com'.
  • method — HTTP method to use; defaults to GET for this operation.

Output shape

a JSON object representing the CI/CD variable corresponding to the specified key within the specified group.

Returns the full API response for the variable. Authentication is required unless 'Skip Authentication' is set. The request path follows '/api/v4/groups/{id}/variables/{key}' where 'id' and 'key' are path parameters.

Examples

Example 1: Get CI/CD variable with key 'MY_VAR' from group with ID 123

Set 'id' to '123' and 'key' to 'MY_VAR' with default method GET and baseUrl 'https://gitlab.com'.

Links

Discussion