Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How do I transform the path between the proxy and the target load balancer endpoint?

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 

 

 
0 1 66
1 REPLY 1