Response rules
Response rules enable you to set up caching, mapping of the response and transforming of response headers. Caching can reduce server load and improve response times. Header transformation offers the following benefits.
- For APIs built on legacy systems, header transformation can modify requests and responses to meet modern standards without changing the back end implementation.
- Custom security headers can be added to responses to protect against common attacks such as Cross-site Scripting (XSS) and Cross-site Request Forgery (CSRF).
- Custom headers can be added or modified to meet specific client requirements or to provide additional context for monitoring.
Response rules include the following:
Shape rule

The Response Cache rule: For external endpoints, caches reoccurring and static HTTP responses to manage latency, decrease response times, and reduce load on the external server. By default, cached HTTP responses are stored based on the Service's URL and request method. Additionally, you can configure cache responses for specified request header keys and query string keys. Following rule configuration, cached responses are returned to HTTP clients instead of requesting resources from the external server.
Transform
Transform rules include the following:

Response Transform rules include:
- Response Mapper: Transforms the response body. The Response Mapper rule contains a mapping table that evaluates an expression and writes the result to an optional field, which then deletes the path specified in the expression. If an expression fails to evaluate, the API is not executed. The Response Mapper rule also contains a Pass Through option for unaffected mappings. The mapping table works similarly to that of the Mapper Snap.
- Response Transformer: Transforms response headers from external endpoints before sending the response to the client. You can add, remove, or modify external endpoint response headers.