How to build a dynamic target end point based on an API proxy request header value ?

Hi Everyone,I have an API proxy request with a header named "ExternalKey" containing dynamic value.

My target end point is https://abcd.com/messageDefinitionSends/key:[ExternalKey]/send. Each time my proxy receives a request I need to extract the header "ExternalKey" value and inject it into the target endpoint. Could someone please help to tell me how this can be done after I extract the header and store it in a flow variable ? Thanks in advance for your help.

Solved Solved
0 4 410
1 ACCEPTED SOLUTION

Not applicable

After extracting header from the request to ExternalKey variable, you can write the target connection as below where ABCD will be mapped to "abcd.com" with port 443 in the environment configuration.

    <HTTPTargetConnection>
        <Properties/>
        <LoadBalancer>
            <Server name="ABCD"/>
        </LoadBalancer>
        <Path>/messageDefinitionSends/key:{ExternalKey}/send</Path>
    </HTTPTargetConnection>

Hope this will help you. Thanks...

View solution in original post

4 REPLIES 4

Not applicable

After extracting header from the request to ExternalKey variable, you can write the target connection as below where ABCD will be mapped to "abcd.com" with port 443 in the environment configuration.

    <HTTPTargetConnection>
        <Properties/>
        <LoadBalancer>
            <Server name="ABCD"/>
        </LoadBalancer>
        <Path>/messageDefinitionSends/key:{ExternalKey}/send</Path>
    </HTTPTargetConnection>

Hope this will help you. Thanks...

@Priyadarshi Ajitav Jena, where did you read the documentation about 'key:' that you have mentioned in your Path element?

In the target https://abcd.com/messageDefinitionSends/key:[ExternalKey]/send. 'key:' is specified. so I kept that in the path.