Modify an Environment Value

PUT /groups/{groupId}/apps/{appId}/environment_values/{environmentValueId}

Modify an existing environment value

Path parameters

application/json

Body

  • _id string

    The environment value's internal ID

  • name string

    The environment value name

  • last_modified number

    The time this configuration was last modified represented by the number of seconds since the UNIX epoch.

  • values object

    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.

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object
    • _id string

      The environment value's internal ID

    • name string

      The environment value name

    • last_modified number

      The time this configuration was last modified represented by the number of seconds since the UNIX epoch.

  • 404 application/json

    Environment value not found

    Hide response attributes Show response attributes object
    • error string

      A message that describes the error.

    • error_code string

      The error type.

      Value is EnvironmentValueNotFound.

PUT /groups/{groupId}/apps/{appId}/environment_values/{environmentValueId}
curl \
 --request PUT 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/environment_values/{environmentValueId}' \
 --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 (200)
{
  "_id": "string",
  "name": "string",
  "last_modified": 42.0
}
Response examples (404)
{
  "error": "string",
  "error_code": "EnvironmentValueNotFound"
}