Using request process in sequence to modify the native URL

Hi,

Is it possible to use Request Transformation policy in sequence? I want to transform incoming request in multiple phases, this would improve re-usability. My requirement is as below:

First request transformation: Assume based on some condition the will be hardcoded - there will be multiple request transformations addressing the update of , the ${request.path.id} will be extracted from incoming request.

Variable: ${request.path}
Value: /drives//${request.path.id}

Second request transformation: The objective here is to evaluate incoming request on some other conditions and then append additional path to the ‘First request’ transformation. Note: In actual implementation i am seeing appending one of the following ‘listitem/fields’, ‘content’, ‘fields’. Essentially this would be limited in number, however if i combine this with First Request transformation then the possibilities will increase by several fold, having sequential transformation will help in this regard.

Variable: ${request.path}
Value: {previous native transformation} + “/listitem/fields”

Is the above possible? If not please suggest alternative, a solution other than using IS Service would be preferred.

Regards
SPM

Hi Manjunath,

Order of execution of policy actions in a stage is not guaranteed by API Gateway.

Thanks Vallab. is there an alternative solution? Considering reusability.

If your transformations are complex to execute in single policy, you can use Invoke IS Service or Custom policy to execute complex transformations in single policy.