Hello All,
Another newbie question here....
I have two APIs ("A" and "B").
Someone makes a call to "A".
Apigee extracts one of the JSON elements (Extract Variable) and calls API "B" to make sure that value is valid.
So I know how to extract the variable and I am using a Service Callout to make the call to "B".
My question is how do I assign that extracted variable from the call to "A" to the query parameter of the call to "B"?
Thanks.
Solved! Go to Solution.
Well one way is to pass the extracted variables as request queryParams using Service callout policy Request >> Set variables.
<ServiceCallout async="false" continueOnError="false" enabled="true" name="Service-Callout-1"> <DisplayName>Custom label used in UI</DisplayName> <Request clearPayload="true" variable="myRequest"> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Set> <QueryParams> <></> </QueryParams> </Set> </Request> <Response>calloutResponse</Response> <Timeout>30000</Timeout> <LocalTargetConnection> <APIProxy/> <ProxyEndpoint/> <Path/> </LocalTargetConnection> </ServiceCallout>
Well one way is to pass the extracted variables as request queryParams using Service callout policy Request >> Set variables.
<ServiceCallout async="false" continueOnError="false" enabled="true" name="Service-Callout-1"> <DisplayName>Custom label used in UI</DisplayName> <Request clearPayload="true" variable="myRequest"> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Set> <QueryParams> <></> </QueryParams> </Set> </Request> <Response>calloutResponse</Response> <Timeout>30000</Timeout> <LocalTargetConnection> <APIProxy/> <ProxyEndpoint/> <Path/> </LocalTargetConnection> </ServiceCallout>
Thanks @Siddharth Barahalikar ~ I appreciate the helpful answers and your explanations.
Sincerely,
Craig
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |