Create instance variable
POST
/api/v4/admin/ci/variables
Creates a instance-level variable. The maximum number of instance-level variables can be changed.
Authorizations
Section titled “ Authorizations ”Request Body required
Section titled “ Request Body required ” Media type application/json
object
key
required
The key of the variable. Max 255 characters
string
description
The description of the variable
string
value
required
The value of a variable
string
protected
Whether the variable is protected
boolean
masked
Whether the variable is masked
boolean
raw
Whether the variable will be expanded
boolean
variable_type
The type of a variable. Available types are: env_var (default) and file
string
Responses
Section titled “ Responses ”Created
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 ..."}400 Bad Request