One API Proxy in Apigee Calling Multiple HTTP Endpoints Comparing the Different Response JSON and Returning the Client the Correct One

nathanaw
Participant V

Hi all, I have a unique requirement to setup and build one API Proxy in Apigee Calling Multiple HTTP Endpoints. With the three different responses from these different endpoints, I will then compare them first before returning the Client the Correct One response JSON. Has anyone had similar requirements?

Thank you very much.

Nathan Aw

Solved Solved
0 2 1,174
1 ACCEPTED SOLUTION

@Nathan Aw

You can do this multiple ways

1. Use javascript httpclient to invoke the endpoints and then handle the response to be sent to the client.

There is a similar example in the docs - similar to your requirement, except that the responses from multiple endpoints are being mashed up before its sent to the client

https://docs.apigee.com/api-platform/samples/cookbook/implementing-http-clients-javascript

2. Use multiple service callouts - one for each endpoint, then handle the response to be sent to the client using a combination of javascript, extract variables and assign message policies

View solution in original post

2 REPLIES 2

@Nathan Aw

You can do this multiple ways

1. Use javascript httpclient to invoke the endpoints and then handle the response to be sent to the client.

There is a similar example in the docs - similar to your requirement, except that the responses from multiple endpoints are being mashed up before its sent to the client

https://docs.apigee.com/api-platform/samples/cookbook/implementing-http-clients-javascript

2. Use multiple service callouts - one for each endpoint, then handle the response to be sent to the client using a combination of javascript, extract variables and assign message policies

thank you. I will try to experiment with that