How can I avoid proxy.basepath copy in service callout LocalTargetConnection?

How do you avoid proxy.basepath being copied in a servicecallout with LocalTargetConnection

What is the option to not append the basepath to the servicecallout?

trace-1552693073477.txt

Parent Proxy Basepath: /externaloauth

Chained proxy path: /cuid/api/token

In the trace I see

servicecallout.requesturi = /cuid/api/token/externaloauth

Is there anything I am missing in the configuration?

I have also tried using loadbalancer with HttpTargetConnection in the service callout as suggested in one of the posts, but I see the same issue there as well.


Below is my servicecallout policy config

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout async="false" continueOnError="false" enabled="true" name="Service-Callout-1">
    <DisplayName>Service Callout-1</DisplayName>
    <Properties/>
    <Request clearPayload="true" variable="MyRequestObject">
        <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    </Request>
    <Response>calloutResponse</Response>
    <LocalTargetConnection>
        <!--<APIProxy>CUID</APIProxy>
        <ProxyEndpoint>default</ProxyEndpoint>-->
        <Path>/cuid/api/token</Path>
    </LocalTargetConnection>
</ServiceCallout>

0 1 463
1 REPLY 1

Nope, there's something else going on that is causing what you are reporting.

the basepath of an API proxy does not get appended to the path of every ServiceCallout policy in the API Proxy, automatically.

Check your assumptions or configurations.

Looking at the Trace you have an AssignMessage policy in the flow with a name like "CopyMessage". I suppose this is appending the inbound path to the path used by the ServiceCallout. Probably that AssignMessage is copying the inbound request to the variable named MyRequestObject .

That's your culprit.

To avoid that, don't copy the path, or copy more carefully - maybe with an AssignVariable or maybe with JavaScript.