GitLab API

GitlabTool

Actions1095

Ci_variables → getApiV4AdminCiVariablesKey

AI-generated

Summary

Retrieve a GitLab CI/CD variable by its key from the admin API, using the specified project or instance base URL.

Inputs

  • Key (required) — The key of the CI variable to retrieve.
  • Skip Authentication — Option to skip OAuth2/API token authentication (default false).
  • baseUrl — The base URL of the GitLab instance to query, defaulting to https://gitlab.com.
  • Method — HTTP method to use; default is GET.

Output shape

a single JSON object representing the CI variable identified by the provided key

The operation returns the details of the CI variable as provided by the GitLab Admin API at the path /api/v4/admin/ci/variables/{key}. Authentication is required by default unless skipped. If the variable does not exist or there is an error, the node may produce an error output depending on n8n error handling settings.

Examples

Example 1: Retrieve the CI variable named 'MY_VAR' from GitLab.com using authenticated request.

Set Key to 'MY_VAR', leave Skip Authentication false, baseUrl to default, and Method to GET.

Links

Discussion