Skip to content
Coritan Docs

Organization API: Organization deployments: Variables

The 3 Organization API operations for variables.

View as Markdown

Part of Organization deployments.

Method Path Summary
PUT /api/v1/orgs/{org_slug}/env-groups/{group_uuid}/variables Set or replace a group's variables
PUT /api/v1/orgs/{org_slug}/env-groups/{group_uuid}/variables/{key} Set a group variable
DELETE /api/v1/orgs/{org_slug}/env-groups/{group_uuid}/variables/{key} Delete one variable of one environment of a group; 404 when it has none

Set or replace a group's variables

Section titled Set or replace a group's variables

PUT /api/v1/orgs/{org_slug}/env-groups/{group_uuid}/variables

Set many variables in one environment of a group, as on a deployment.

Name In Type Required
group_uuid path string (uuid) yes
org_slug path string yes

application/json (required)

Field Type Required Description
environment string no
vars array of VariableIn yes
vars[].key string yes
vars[].value string or null no Left out: the saved value is kept
vars[].secret boolean or null no Withheld from exports and redacted from build logs; new variables default to true
vars[].target string or null no
replace boolean no Delete every variable of this environment not in vars
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

PUT /api/v1/orgs/{org_slug}/env-groups/{group_uuid}/variables/{key}

Set one variable in one environment of a group.

Name In Type Required Description
group_uuid path string (uuid) yes
key path string yes
org_slug path string yes
environment query string no The environment it is set in: all, production, preview or development Default: all.

application/json (required)

Field Type Required
value string or null no
secret boolean or null no
target string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Delete one variable of one environment of a group; 404 when it has none

Section titled Delete one variable of one environment of a group; 404 when it has none

DELETE /api/v1/orgs/{org_slug}/env-groups/{group_uuid}/variables/{key}

Delete one variable of one environment of a group; 404 when it has none.

Name In Type Required Description
group_uuid path string (uuid) yes
key path string yes
org_slug path string yes
environment query string no The environment it is deleted from: all, production, preview or development Default: all.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.