How to configure ServiceCallOut policy to call another Proxy endpoint in same org with query parameter in request?

Can anyone help me for adding query parameter to a ServiceCallout Policy to call another proxy endpoint in same org.

<LocalTargetConnection>

<APIProxy>ProxyName</APIProxy>

<ProxyEndpoint>Proxy_Endpoint_Name</ProxyEndpoint>

</LocalTargetConnection>

What are the changes I have to make in the above code?

Solved Solved
0 3 128
1 ACCEPTED SOLUTION

<ServiceCallout name="ServiceCallout-GeocodingRequest1">
    <DisplayName>Inline request message</DisplayName>
    <Request variable="authenticationRequest">
      <Set>
        <QueryParams>
          <QueryParam name="address">{request.queryparam.postalcode}</QueryParam>
          <QueryParam name="region">{request.queryparam.country}</QueryParam>
          <QueryParam name="sensor">false</QueryParam>
        </QueryParams>
      </Set>
    </Request>
    <Response>GeocodingResponse</Response>
    <Timeout>30000</Timeout>
    <LocalTargetConnection>
    	<APIProxy>data-manager</APIProxy>
    	<ProxyEndpoint>default</ProxyEndpoint>
    </LocalTargetConnection>
</ServiceCallout>

This is clearly documented, did you try using the Set tag?

View solution in original post

3 REPLIES 3

<ServiceCallout name="ServiceCallout-GeocodingRequest1">
    <DisplayName>Inline request message</DisplayName>
    <Request variable="authenticationRequest">
      <Set>
        <QueryParams>
          <QueryParam name="address">{request.queryparam.postalcode}</QueryParam>
          <QueryParam name="region">{request.queryparam.country}</QueryParam>
          <QueryParam name="sensor">false</QueryParam>
        </QueryParams>
      </Set>
    </Request>
    <Response>GeocodingResponse</Response>
    <Timeout>30000</Timeout>
    <LocalTargetConnection>
    	<APIProxy>data-manager</APIProxy>
    	<ProxyEndpoint>default</ProxyEndpoint>
    </LocalTargetConnection>
</ServiceCallout>

This is clearly documented, did you try using the Set tag?

Thank you for the quick response. I thought the set tag is only applicable for ServiceCallout with HTTPTargetConnection.

The Set element works with LocalTargetConnection.

If there is something in the documentation that lead you to conclude that Set is applicable only with HTTPTargetConnection, let us know and we'll clarify it.