Amazon API Gateway
Developer Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Set up a Gateway Response Using the API Gateway REST API

Before customizing a gateway response using the API Gateway REST API, you must have already created an API and have obtained its identifier. To retrieve the API identifier, you can follow restapi:gateway-responses link relation and examine the result.

To customize a gateway response using the API Gateway REST API

  1. To overwrite an entire GatewayResponse instance, call the gatewayresponse:put action, specifying a desired responseType in the URL path parameter and supplying in the request payload the statusCode, responseParameters and responseTemplates mappings.

  2. To update part of a GatewayResponse instance, call the gatewayresponse:update action, specifying a desired responseType in the URL path parameter and supplying in the request payload desired individual GatewayResponse properties, for example, the responseParameters or the responseTemplates mapping.