How do I transform a request using Request Transformation Policy?
Use the Request Transformation policy to modify the contents of an incoming request such as headers, payload, query parameters, path parameters, HTTP method using the configurations given by the API Provider.
The request transformation workflow is as follows:
- The API Provider configures the Request Transformation policy in the Request Processing stage of webMethods API Gateway. The API provider configures the details about when and how to transform the contents of an incoming request.
- The client sends the request to webMethods API Gateway.
- webMethods API Gateway applies the transformations configured by the API Provider and transforms the incoming request.
- webMethods API Gateway sends the transformed request to the native API.
- Native API processes the transformed request and sends the response to webMethods API Gateway.
- webMethods API Gateway forwards the response to the client.

Consider a scenario where you have a legacy REST API (employeeApi) that does not adhere to
the REST API standards. For example, it accepts functional information such as employee name
through a header employeeName
instead of accepting them through query or
path parameters and you want to modify the API to REST standards.
To configure request transformation policy:
This request
transformation policy configuration allows the native API to accept the header
values through query parameters. The native API accepts the header values
through the query parameters by transforming the query parameters to header
parameters and then removing the query parameter from the incoming request.