Response Transformation
This policy specifies the properties required to transform response messages from native APIs into a format required by the client.
The transformations include Header transformation, Status transformation, Payload transformation, and Advanced transformation. You can configure conditions according to which the transformations are executed
Property | Description |
---|---|
Condition | Conditions are used to specify when the
policy has to be executed. You can add multiple conditions with logical
operators.
Available values are:
Click
Add Condition and provide the
following information and click
![]()
For details about the variables available in API Gateway, see Variables Available in API Gateway. |
Transformation Configuration. Specifies various transformations to be configured. | |
HeaderTransformation | Specifies the header, query or path
transformation to be configured for the responses received from the native API.
You can add or modify header, query or path transformation parameters by providing the following information:
You can add multiple variables and corresponding values by
clicking
You can remove any header, query, or path transformation parameters by typing the plain value or value with a syntax. Note: Software AG
recommends you not to modify the headers
${response.headers.Content-Length} and
${response.headers.Content-Encoding} as
API Gateway
adds the right values for these headers before sending the response back to
client.
For details about the variables available in API Gateway, see Variables Available in API Gateway. Note: Payload transformation does not happen automatically
for content-type transformation. When you change the content type, ensure to do
payload transformation. For example, if you change the content-type header from
application/xml to application/json, you must also change the respective
payload from application/xml to application/json.
|
Status transformation | Specifies the status transformation to be
configured for the responses received from the native API.
Provide the following information:
|
Payload Transformation | Specifies the payload transformation to
be configured for the responses received from the native API.
Provide the following information:
|
Advanced Transformation | Specifies the advanced transformation to
be configured for the responses received from the native API..
Provide the following information:
|
Transformation Metadata. Specifies the metadata for transformation of the responses received from the native API. For example, the namespaces configured in this section can be used when you provide the syntax for XPath ${response.payload.xpath} For example: ${response.payload.xpath[//ns:emp/ns:empName]} | |
Namespace | Specifies the namespace information to be
configured for transformation.
Provide the following information:
|