Variable Main Calls

Create a variable

  • Create a variable with the scope defined in the request body.
post/variable

Request

Request body

keystring required

the key of the environment variable

valuestring required

the value of the environment variable

mount_pathstring nullable

the path where the file will be mounted (only if type =file)

is_secretboolean required

if true, the variable will be considered as a secret and will not be accessible after its creation. Only your applications will be able to access its value at build and run time.

variable_scope'APPLICATION' | 'BUILT_IN' | 'ENVIRONMENT' | 'PROJECT' | 'CONTAINER' | 'JOB' | 'HELM' | 'TERRAFORM' required
variable_parent_idstring uuid required

based on the selected scope, it contains the ID of the service, environment or project where the variable is attached

descriptionstring nullable

optional variable description (255 characters maximum)

enable_interpolation_in_fileboolean nullable

Response

Create a variable

idstring uuid required
created_atstring date-time required
updated_atstring date-time
keystring required
valuestring nullable required
mount_pathstring nullable
scope'APPLICATION' | 'BUILT_IN' | 'ENVIRONMENT' | 'PROJECT' | 'CONTAINER' | 'JOB' | 'HELM' | 'TERRAFORM' required
variable_type'VALUE' | 'ALIAS' | 'OVERRIDE' | 'BUILT_IN' | 'FILE' required

type of the environment variable (VALUE, FILE, ALIAS, OVERRIDE or BUIT_IN)

service_idstring uuid

The id of the service referenced by this variable.

service_namestring

The name of the service referenced by this variable.

service_type'APPLICATION' | 'CONTAINER' | 'DATABASE' | 'JOB' | 'HELM' | 'TERRAFORM'

type of the service (application, database, job, gateway...)

owned_bystring

Entity that created/own the variable (i.e: Qovery, Doppler)

is_secretboolean required
descriptionstring
enable_interpolation_in_fileboolean

Example response

{
  "aliased_variable": {
    "key": "DATABASE_PSQL_NAME"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.