GitLab API

GitlabTool

Actions1095

Ci_variables → postApiV4ProjectsIdVariables

AI-generated

Summary

Create a new CI/CD variable for a specified GitLab project by providing the project ID or URL-encoded namespace/project name along with the variable details in the request body.

Inputs

  • id (required) — The ID of a project or URL-encoded NAMESPACE/PROJECT_NAME of the project owned by the authenticated user.
  • postApiV4ProjectsIdVariables (required) — The request body containing the details of the CI/CD variable to create for the project.

Output shape

a JSON object representing the newly created CI/CD variable associated with the specified project.

Requires authentication via the configured GitLab API credential unless Skip Authentication is enabled. The operation performs a POST request to the endpoint /api/v4/projects/{id}/variables.

Links

Discussion