The API entity schema is used to define an OpenWhisk API within a manifest.
<apiName>: <basePath>: <relativePath>: <actionName>: method: <get | delete | put | post | ...> response: <http | json | text | html>
packages: hello_world_package: version: 1.0 license: Apache-2.0 actions: hello_world: function: src/hello.js annotations: web-export: true apis: hello-world: hello: world: hello_world: method: GET response: json goodbye-world: hello: world: hello_world: method: DELETE response: json
basePath
value MUST NOT start with a /
character.relativePath
value MUST NOT start with a /
character.web-export
set to true
, can be used as an API endpoint's action.apiName
in the manifest is ignored.response
values, also known as content extensions.response
value of http
will give you the most control over the API request and response handling.