Create an Environment Value
Define a new environment value.
Path parameters
-
An Atlas Project/Group ID.
-
The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value.
Body
-
The environment value's internal ID
-
The environment value name
-
The time this configuration was last modified represented by the number of seconds since the UNIX epoch.
-
An object that maps environment names to values. The environment value resolves to the current active environment's mapped value.
If no value is mapped to the current active environment, the environment value resolves to
undefined
.
POST
/groups/{groupId}/apps/{appId}/environment_values
curl \
--request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/environment_values' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"_id":"string","name":"string","last_modified":42.0,"values":{}}'
Request examples
{
"_id": "string",
"name": "string",
"last_modified": 42.0,
"values": {}
}
Response examples (201)
{
"_id": "string",
"name": "string",
"last_modified": 42.0
}
Response examples (409)
{
"error": "string",
"error_code": "string"
}