1 Answer
- Newest
- Most votes
- Most comments
1
In API Gateway you have to create Integration Response and Method Response for each status code (200, 302, 400, 500) you want to present.
You can get all data from Integration Request into Integration Response except Status Code since API Gatewway manages it for you.
Here's an example of getting the body from Integration Request into Integration Response when using Mock:
Integration Request
#set($context.requestOverride.path.body = $input.body)
{
"statusCode": 200,
}
Integration Response
#set($body = $context.requestOverride.path.body)
{
"statusCode": 200,
"body": $body,
}
answered a year ago
Relevant content
- asked a year ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
Yes, Thanks for help. Also I found this documentation helpful : https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html There are ways to get different parameters directly in Integration response