Create a product REST endpoint in API Gateway
A product REST endpoint is an access point to your portal product. Each endpoint consists of the path and method of a REST API and the stage it's deployed to. The endpoint includes any documentation you've defined for your REST API, or can be updated with custom documentation. When you create your product REST endpoint, you configure the following settings:
-
The product REST endpoint's operation name. If your REST API has the path and method
GET /pets, in a portal, the name is/pets. Using the operation name, you can change the product REST endpoint name toPet summaries. This doesn't impact your existing API. -
The try it functionality for your product endpoint. This lets API consumers try your APIs in your portal. If you create a product endpoint for a private API, the try it functionality is set to
UNAVAILABLE. For more information, see Enable try it for an API Gateway product REST endpoint in your portal. -
If you currently have documentation parts defined for your REST API, you can either import the documentation or override your existing documentation and create new product-level documentation using GitHub Flavored Markdown
. Any documentation overrides do not propagate back to your API Gateway API documentation parts. If you import your current documentation parts, API Gateway syncs changes across your API to your product REST endpoint.
Create a product REST endpoint
The following procedure shows how to add a product REST endpoint to an existing portal product. To learn how to create a portal product and a product REST endpoint together, see Create a portal product in API Gateway.
To create a product REST endpoint for a product portal
Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway
. In the main navigation pane, choose Portal products.
Choose a portal product.
Choose the Associated endpoints tab, and then choose Add endpoints.
-
To select your product REST endpoints, under API endpoints choose an API, and then choose a stage.
To add an endpoint to your product REST endpoints, select the API endpoint, and then choose Add to product.
The API endpoint will appear in the Selected API endpoints list.
Choose Submit.
-
Your product REST endpoint page is now a draft. Choose Draft API reference pages, and then choose your product REST endpoint page to finalize the content of the page.
Choose Edit page.
-
To override the existing API Gateway documentation, for Documentation source, turn on Override the documentation and do the following:
For Display content, choose Create override.
For Operation name, enter a new operation name.
For Page body, enter your custom documentation.
-
(Optional) For Endpoint, enter a custom endpoint that appears in your portal.
-
To let customers invoke your API in your portal, select Try it functionality. For more information, see Enable try it for an API Gateway product REST endpoint in your portal.
-
For Section name, enter a name or choose an existing section. When you add your product REST endpoint to a section, consumers can view your content on a published portal.
Choose Save changes.
To allow the new page to be visible to consumers, you still need to republish your portal. For more information, see Publish a portal in API Gateway.