My APIGEE API proxy base path is /ident/post/webhooks, and when the full url https://apigee.url.com//ident/post/webhooks/foo then I need to reroute the traffic to the load balancer url https://ilb.url.com/api/mynew/test/foo. So the path suffix /foo I need to add allong with the load balancer path /api/mynew/test.
I tried with a AssignMessage policy but didn’t worked
<AssignMessage async="false" continueOnError="false" enabled="true" name="RewriteWebhookTargetPath"> <DisplayName>Rewrite Webhook Target Path</DisplayName> <Properties/> <Set> <Path>/api/mynew/test{request.pathsuffix}</Path> </Set> <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> <AssignTo createNew="false" transport="http" type="request"/> </AssignMessage>
I could see the target url is wrongly forwarded to https://ilb.url.com/foo
Also the load balancer is defined in target connection tag.
Target URL is not enough. In my case, I need point to target connection
<HTTPTargetConnection> <LoadBalancer> <Server name="httpbin-test-ue1"/> </Server> </LoadBalancer> <Path>/</Path> </HTTPTargetConnection>
Example code