Update a variable
PUT
/api/v4/projects/{id}/variables/{key}
Updates a project variable. If there are multiple variables with the same key, use filter to select the correct environment_scope.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body
Section titled “ Request Body ” Media type application/json
object
value
The value of a variable
string
protected
Whether the variable is protected
boolean
masked
Whether the variable is masked
boolean
environment_scope
The environment_scope of a variable
string
raw
Whether the variable will be expanded
boolean
variable_type
The type of the variable. Default: env_var
string
filter
Available filters: [environment_scope]. Example: filter[environment_scope]=production
object
environment_scope
The environment scope of a variable
string
description
The description of the variable
string
Responses
Section titled “ Responses ”OK
Media type application/json
object
variable_type
string
key
string
value
string
hidden
boolean
protected
boolean
masked
boolean
raw
boolean
environment_scope
string
description
string
Example
{ "variable_type": "env_var", "key": "TEST_VARIABLE_1", "value": "TEST_1", "environment_scope": "*", "description": "This variable is being used for ..."}Bad Request
Variable Not Found