Skip to content

Latest commit

 

History

History
43 lines (38 loc) · 1.09 KB

03-07-env-vars-app-creation-api.md

File metadata and controls

43 lines (38 loc) · 1.09 KB
title date tags authors description aliases excludeSearch
API: set environment variables at application creation
2024-03-07
api
applications
A game changer for some features coming soon
/changelog/2024-03-07-env-vars-app-creation-api
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}.