mrutkows / openwhisk-knative-build

Knative build resources for Apache OpenWhisk Functions
Apache License 2.0
0 stars 1 forks source link

Support Web Action data/metadata #18

Open mrutkows opened 5 years ago

mrutkows commented 5 years ago

For background see: https://serverless.com/framework/docs/providers/openwhisk/guide/web-actions/

functions: my_function: handler: index.main annotations: web-export: true

Functions with this annotation can be invoked through a URL template with the following parameters.

https://{APIHOST}/api/v1/web/{USER_NAMESPACE}/{PACKAGE}/{ACTION_NAME}.{TYPE}

    APIHOST - platform endpoint e.g. openwhisk.ng.bluemix.net.
    USER_NAMESPACE - this must be an explicit namespace and cannot use the default namespace (_).
    PACKAGE - action package or default.
    ACTION_NAME - default form ${servicename}-${space}-${name}.
    TYPE - .json, .html, .text or .http.

Return values from the function are used to construct the HTTP response. The following parameters are supported.