Response Integration
Explore how AWS API Gateway handles response integration to transform backend API responses using mapping templates and context variables. Learn to customize response headers, status codes, and bodies including integration with external APIs for enhanced functionality.
We'll cover the following...
API response
A REST API request usually yields a response from the server. This response can be either a complete JSON, for instance, in response to a GET or a POST request, or a simple status code returned in response to some PUT request. When this data flows through the API Gateway, we have all the freedom to play with it. We can translate the headers and return codes and transform the body using the Velocity templates.
API Gateway provides request integration to transform the input request to the target API. Similarly, it enables response integration to translate the response of the target API to what the API client requires in the response.
The HTTP API and WebSocket API can be configured for response integration. They have minimal functionality, however. To use the full features, we should ...