I am new in apigee.
I am using postman to post some data into apigee proxy.In the proxy I have some code.I filter the data.I am getting the filtered data as a response in postman.
Is there a possibility of redirecting the response to a different api with payload?
Please help.
Yes, it is possible, we can use the Service Callout Policy to call another REST API.
You can pass the filtered_data variable in Set Payload,
<ServiceCallout name="ServiceCallout-GeocodingRequest1"> <DisplayName>Inline request message</DisplayName> <Request variable="callAnotherService"> <Set> <Payload contentType="application/json"> {filtered_data} <!-- use variables or raw json data --> </Payload> </Set> </Request> <Response>CalloutResponse</Response> <Timeout>30000</Timeout> <HTTPTargetConnection> <URL>http://your-url.com</URL> <!-- give your url here --> </HTTPTargetConnection> </ServiceCallout>
The Service callout response will be available in CalloutResponse
@Dino-at-GoogleHow can i see the data in the redirected api?Is there any mock api that server my purpose?Do i need to attach assign policy to get the response ?Please help