Update Environment Variables For App

Update Environment Variables For App
Update environment variables for an app

Update the environment variables associated with the given app. The variables given in the request will be merged with the existing app environment variables. Any requested variables with a value of null will be removed from the app. Environment variable names may not start with VCAP_. PORT is not a valid environment variable. The updated environment variables will not take effect until the app is restarted.

Request
URI
PATCH
https://api.example.local/v3/apps/{guid}/environment_variables
COPY
Path Parameters
string
guid
Required

The unique identifier for the resource


Request Body
{
    "var": {
        "var": "string"
    }
}
object
var
Optional

Environment variables to inject; keys and values must be strings

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns AppEnvironmentVariables of type(s) application/json
{
    "var": {
        "var": "string"
    },
    "links": {
        "self": {
            "href": "string",
            "method": "string"
        },
        "app": {
            "href": "string",
            "method": "string"
        }
    }
}
object
var
Optional

Environment variables

object
links
Optional

links


401

Unauthorized

Returns Unauthorized of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


403

Forbidden

Returns Forbidden of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


404

Not Found

Returns NotFound of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


422

Unprocessable Entity

Returns UnprocessableEntity of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


Code Samples
COPY
                    curl -X PATCH -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}'