XSLT is not the ONLY transformation language supported by DataPower. Starting with the firmware version 7.0.0.0, DataPower supports a new transformation technology – Gateway Script, to handle all sorts (API, B2B, Web, Mobile, SOA) of traffic effectively. For more information, please review the documentation.
IBM provides an interactive website that lets you write Gateway Script code and execute on a cloud hosted DataPower Gateway for learning purposes. The website provides many examples that you can test as it is or edit based on your requirements. It also provides separate tabs to modify the sample code, provide request, view Response and logs.
I tested the following use-case in just a few seconds. There was no need to configure services, or policies to test the transformation piece through Gateway Script.
Use-case : Modify incoming JSON request payload (Add new object in Books array)
Step – 1 : Clicked on 1st sample in Code tab, tweaked the request as shown below.
Step-2 : Provided the request in Request tab as shown below. Didn’t modify anything in HTTP headers field.
Step – 3 : View the response using Response tab.
Step – 4 : View the datapower system logs using Logs tab.