Assign Message Query Parameter

I have a target endpoint URL as


https://abc-dev.apigateway.mhmc.com/worker

My proxy URL is

https://mss-asd-int-non-prod-ingress.fdfd.sss.com/v1/trs/workers/123456

I use extract variable to get emplid(at the end which is 123456) from the URL and pass it as Query Param to Target endpoint.

My Assign Message Policy is

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage continueOnError="false" enabled="true" name="AM-TRSCall">
    <DisplayName>AM-TRSCall</DisplayName>
    <Properties/>
    <Set>
        <QueryParams>
            <QueryParam name="emplid">{emplid}</QueryParam>
        </QueryParams>
    </Set>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
    <AssignTo type="request" transport="http" createNew="false"/>
</AssignMessage>

The Target Endpoint accepts emplid as parameter as below

https://abc-dev.apigateway.mhmc.com/worker/123456

However, when I see the CURL request sent to backend I get below URL

https://abc-dev.apigateway.mhmc.com/worker?emplid=1043929


How can I construct the required URL as below using the AM policy

https://abc-dev.apigateway.mhmc.com/worker/123456

Solved Solved
0 2 116
1 ACCEPTED SOLUTION

Not applicable

You need not to add any policy.

Just configure your basepath as /v1/trs/worker

And configure your backend as

https://abc-dev.apigateway.mhmc.com/worker

This will automatically work as you expect.

View solution in original post

2 REPLIES 2

Not applicable

You need not to add any policy.

Just configure your basepath as /v1/trs/worker

And configure your backend as

https://abc-dev.apigateway.mhmc.com/worker

This will automatically work as you expect.

Hi,

I configure backend URL as below and it worked too.

URLhttps://workday-dev.apigateway.mrshmc.com/worker/{emplid}