title | date | tags | authors | description | aliases | excludeSearch | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
API: set environment variables at application creation |
2024-03-07 |
|
|
A game changer for some features coming soon |
|
true |
When you create an application with the Clever Cloud API, you can now set environment variables directly. This feature is available in the POST v2/organisations/{id}/applications
endpoint, with an object to set:
"env": {
"ENV_VAR": "value",
"ANOTHER_ENV_VAR": "another value"
}
The response will contain an env
object, with the environment variables set:
"env": [
{
"name": "ENV_VAR",
"value": "value"
},
{
"name": "ANOTHER_ENV_VAR",
"value": "another value"
}]
You can get this object from the applications endpoints, such as GET v2/organisations/{id}/applications/{appId}
.