Response rules

Response rules enable you to set up caching, transformation, and mapping.

Shape rule


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

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.