Is there a way to stop the proxy pathsuffix from being appended to the uri of a service callout policy in the proxy request flow?

It could probably be done in Javascript but I’m trying to avoid this if possible.

For example, if I have a request coming into my API proxy:

https://edward-test.apigee.net/v1/books

And then my API proxy has a Service Callout Policy to a different API proxy endpoint eg:

https://edward-test.apigee.net/v1/libraries/bookAvailability

The problem is, the variable proxy.pathsuffix in the second API proxy has the value:

/bookAvailability/v1/books

instead of:

/bookAvailability

I can’t fiddle around with the target.url using an Assign Message policy since the Service Callout is done in the proxy request flow.

Dear @Edward ,

Welcome to Apigee Community :slight_smile: Can you please provide an example / add more details to understand better ?

Thanks! I’ve added some more detail to the question. Hopefully the problem is clear now

Dear @Edward ,

I see proxy.pathsuffix as “/bookAvailability” in my second proxy when called same in first proxy using service callout policy. Please find attached API Proxies.

I have tested same using trace tool & works as per design.

firstproxy-rev1-2016-01-18.zipsecondproxy-rev1-2016-01-18.zip

2 Likes

Thanks for the reply. I worked out from your first proxy example that the problem arises when the service callout uses the variable “request”. If I create a variable inline like “myRequest”, everything is fine.

Awesome, Glad issue is resolved :slight_smile:

Hi Anil, could you please answer the following question. waiting for ur answer. …

https://googleweblight.com/i?u=https://community.apigee.com/questions/37919/service-callout-using-localtargetconnection-not-se.html&hl=en-IN&tk=14032556255848823126&grqid=j3mMP_9k%23#