Files
fn-serverless/docs/apps.md
C Cirello 3b16b7f1d8 functions: application updates no longer accept name in the body (#391)
* functions: application updates no longer accept name in the body

AppUpdate was initially conceived as an upsert endpoint for apps.
It turns out that it created an inconsistency regarding updates:
updates with names divergent with URL would not actually change
application's name.

This commit atempts to address the issue by returning an HTTP
error when trying to update an application name. In swagger.yml,
application names are already `readOnly:true`. Thus there is no
change from expected behavior.

Fixes #380

* functions: use specific error value for name change
2016-12-07 19:54:21 +01:00

839 B

Applications

Applications are the top level object that groups routes together to create an API.

App level configuration

When creating or updating an app, you can pass in a map of config variables.

config is a map of values passed to the route runtime in the form of environment variables.

Note: Route level configuration overrides app level configuration.

fn apps create --config k1=v1 --config k2=v2 myapp

Or using a cURL:

curl -H "Content-Type: application/json" -X POST -d '{
    "app": {
        "name":"myapp-curl",
        "config": {
            "k1": "v1",
            "k2": "v2"
        }
    }
}' http://localhost:8080/v1/apps

Notes

App names are immutable. When doing PUT calls, keep in mind that although you are able to update an app's configuration set, you cannot really rename it.