Sign in

Create project variable

documented

Create a new project CI/CD variable.

POST /projects/:id/variablesProjectsno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://gitlab.com/api/v4/projects/{{$project_id}}/variables" \
  -X POST \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
  -d "{\"key\": \"{{$key}}\", \"value\": \"{{$value}}\", \"environment_scope\": \"{{$environment_scope}}\", \"description\": \"{{$description}}\", \"variable_type\": \"{{$variable_type}}\", \"masked\": {{$masked}}, \"protected\": {{$protected}}, \"raw\": {{$raw}} }"
Create project variable · GitLab · OpenIntegrations