GitLab API

GitlabTool

Actions1095

Ci_variables → postApiV4AdminCiVariables

AI-generated

Summary

Create a new CI/CD variable at the GitLab instance level by sending a POST request to the "/api/v4/admin/ci/variables" endpoint with the required variable details in the request body.

Inputs

  • skipAuthentication — If set to true, bypasses authentication for this request.
  • baseUrl — Base URL of the GitLab instance (default is https://gitlab.com).
  • method (required) — HTTP method to use; fixed to POST for this operation.
  • requestBody (required) — The data for the new CI/CD variable, following the schema referenced as 'postApiV4AdminCiVariables', must be provided in the request body.

Output shape

a single JSON object representing the created CI/CD variable.

The operation uses the credentials configured under 'gitlabApi' unless 'skipAuthentication' is true. The response contains the details of the newly created variable as returned from the GitLab API.

Links

Discussion