diff --git a/src/pages/guides/configuration/index.md b/src/pages/guides/configuration/index.md index be2534b09..ab9baabf5 100644 --- a/src/pages/guides/configuration/index.md +++ b/src/pages/guides/configuration/index.md @@ -167,6 +167,51 @@ In addition to the base annotations provided by Runtime (See [here](https://gith - **disable-download** (Default: false) - Determines whether action code can be downloaded. Once this annotation is set to true, it cannot be set back to false. - **require-adobe-auth** (Default: false) - Determines whether the action will require Adobe authentication to invoke. See [here](https://developer.adobe.com/app-builder/docs/guides/security/#authentication-and-authorization-handling) for more. +##### API Gateway Configuration + +A Runtime API Gateway configuration can be added to expose web actions over specific paths and HTTP verbs. + +```yaml +runtimeManifest: + packages: + petsapp: + license: Apache-2.0 + actions: + get-pets: # Note the name of the action + function: actions/get-pets/index.js + web: 'yes' + runtime: nodejs:18 + get-pet: # Note the name of the action + function: actions/get-pet/index.js + web: 'yes' + runtime: nodejs:18 + apis: + get-pets: # API Name + v1: # Base Path + pets: # Relative Path + get-pets: # Name of the action to connect this path to + method: get + response: http + get-pet: # API Name + v1: # Base Path + pets/{petName}: # Relative Path, with a path parameter + get-pet: # Name of the action to connect this path to + method: get + response: http +``` + +> Note: The configuration above will result in the following: +> - `GET https://adobeioruntime.net/apis/[namespace]/v1/pets` +> - `GET https://adobeioruntime.net/apis/[namespace]/v1/pets/{petName}` + +> Note: The second API above defines a path parameter in the relative path by using curly braces, i.e `pets/{petName}` +> - APIs using path parameters must use the `http` response type + +- The following options are available for `method`: get, post, put, delete, patch +- The following options are available for `response`: http (default), json, text, or html + +Learn more about API Gateway Configuration with the [Action APIs QuickStart](https://github.com/adobe/appbuilder-quickstarts/tree/master/action-apis) + #### Hooks to customize the tooling Hooks can be used to customize `aio app` commands. Hooks are documented [here](https://github.com/AdobeDocs/project-firefly/blob/main/src/pages/guides/app-hooks.md).