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: ![]() For example if you want to transform status code as 201, provide 201 in the Code field. ![]() As both these properties support variable framework, you can make use of the available variables to transform the response code and message. For example You have submitted successfully can be used to transform the original OK status message. For details about the variables available in API Gateway, see
Variables Available in API Gateway. |
Payload Transformation | Specifies the payload transformation to be configured for the responses received from the native API. Provide the following information: ![]() ![]() As this property supports variable framework, you can make use of the available variables to transform the response messages. For example, consider the client accepting two integer values value1 and value2, and you want to pass these two values from API Gateway to the client, you can configure the payload field as follows: { "value1" : 12, "value2" : 34 } You can also configure the payload field using one or more variables by using variable framework. Let us see another syntax. For example, for the same API seen in the previous example, if your native sends both the values through headers val1 and val2, and you want to add it to payload for the client to recognize the input, you can do so by configuring the payload field as follows: { "value1" :${response.headers.val1}, "value2" :${response.headers.val2} } For details about the variables available in API Gateway, see
Variables Available in API Gateway. Note: If your payload content-type is different from the incoming payload's content-type, you need to transform the content-type of the header using Header Transformation. ![]() ![]() Click Browse to browse and select a file. ![]() ![]() You can add more XSLT features and xslt documents by clicking ![]() Note: API Gateway supports XSLT 1.0 and XSLT 2.0. ![]() ![]() When you receive the response in JSON, you can use a XSLT file similar to the below sample: <?xml version="1.0" ?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="/" > <xsl:element name="fakeroot"> <xsl:element name="fakenode"> <!-- Apply your transformation rules based on the response received from the native API--> </xsl:element> </xsl:element> </xsl:template> </xsl:stylesheet> When you receive the response in XML, you can use a XSLT file similar to the below sample: <?xml version="1.0" ?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <xsl:output method="xml"/> <xsl:template match="/" > <xsl:element name="soapenv:Envelope"> <xsl:element name="soapenv:Body"> <!-- Apply your transformation rules based on the response received from the native API--> </xsl:element> </xsl:element> </xsl:template> </xsl:stylesheet> |
Advanced Transformation | Specifies the advanced transformation to be configured for the responses received from the native API.. Provide the following information: ![]() You can add multiple services by clicking ![]() Note: The webMethods IS service must be running on the same Integration Server as API Gateway. ![]() ![]() ![]() |
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: ![]() For example, specify the namespace prefix as SOAP_ENV. ![]() For example, specify the namespace URI as http://schemas.xmlsoap.org/soap/envelope/. This declaration defines SOAP_ENV as an alias for the namespace: http://schemas.xmlsoap.org/soap/envelope/. Note: You can add multiple namespace prefix and URI by clicking ![]() |