...
...
...
...
...
...
...
...
...
...
...
JIRA: PLAT-4843
Overview
...
Note | ||
---|---|---|
| ||
This API Management solution will be deprecated in the February 2021, 4.24 SnapLogic release. Starting with the 4.23 Release (November 2020), we recommend that you use the Native API Manager, which allows you to manage your Triggered and Ultra Tasks as APIs without having to bundle them in Proxies. |
On this page
Table of Contents |
---|
Overview
Request and response transformations enable you to modify the contents of your Proxy APIs using key/value pairs in the following ways:. To do so, you can apply the following API Policies:
- Request transformation: use Use this policy to transform a header, body, or the query string in the upstream request API call before it is forwarded to the Proxy API endpoint.
- Response transformation: use Use this policy to transform a header or JSON content in the API response that is returned to the caller.
These policies support different operations, which you can apply to different parts of the Proxy API. Depending on the operation type, you can modify the header, query string, or body of the Proxy API.
Supported Operation Types
You can perform the following operations when apply applying the transformation policy:
- Add key/value pairs
- Append a key/value pair to an existing key/value pair
- Remove a key/value pair
- Rename an existing key
- Replace a key/value pair
Order of Operations
The following table lists the order of operations for requests and response transformations:
Order | Request Transformer | Response Transformer |
---|---|---|
1 | Remove | Remove |
2 | Rename | Replace |
3 | Replace | Add |
4 | Add | Append |
5 | Append | N/A |
Note | ||
---|---|---|
| ||
Request and Response Header transformations occur before the Pipeline is executed, so in the case of in Triggered Tasks, any custom HTTP headers or other arguments passed through Pipeline Parameters occur afterward. |
Limitations
You cannot apply transformations to the Authorization header of a request.
Transform Requests
You can transform contents in the API requests for the following situations:
...
Note | ||
---|---|---|
| ||
This operation is not viewable in the Developer Portal or API Manager. |
Transform Responses
You can transform contents in the API responses for the following situations:
- To add parameters for clarifying information.
- To expose the original query string to the consumer.
- To rename or replace sensitive content (like data keys or bearer tokens) not intended to be viewed by the API consumer.
Examples
The following image shows the Proxy API, without a response transformation, after it has been executed in the Developer Portal.
The following image shows the Response Transformer being set to add the content-type key totalNumbers to the header:
...