Using Apigee Edge , can we make multiple API talk to each other and then proxy it as single API?

Not applicable

I am very new to Apigee and may be what I am asking could be irrelevant to what Apigee provides. But taking an excuse of being new, I will ask this question :

Suppose I have two REST APIs, say weather and traffic. And I also have a mobile app or, say, some other app that wants to talk to Apigee APIs. Now can Apigee Edge be configured such that both REST APIs interact with other and give a new service altogether .. something like "Should I get out on the road now ? "

I am trying to avoid code in app and instead want both the API to talk to each other figure out and then tell app what to do.

I hope I am making sense as I am using general words.

2 3 2,801
3 REPLIES 3

Not applicable

Yes you can do what you describe.

But it's not that the existing APIs "talk to each other". Instead you are introducing a new actor into the system - the API proxy - which communicates to both existing APIs and combines their results. You might call it a "Server-side mashup".

A proxy defined in Apigee Edge can aggregate various fine grained backend APIs to provide a client (or app) with a coarse grained meaningful business API. Look at polices like ServiceCallout, and the JavaScript policy, which supports http clients. These are distinct from the target endpoint.

So in a single flow you can have one target endpoint (one backend API call) and various other service callouts (multiple backend-api calls); process and combine the results from these, and present the single combined output to the client.

Not applicable

Orchestration is one of the more powerful features of Apigee. We routinely see customers aggregating things like Account Summary pulling data from a CRM system, an ERP, and perhaps an commerce/order management system into a single payload.

As Sri says, the liberal use of ServiceCallout policies, the target, and then Javascript, Python, or Java callouts to aggregate the payloads is typical.

We have published some good samples of how to achieve this. Take a look at Mashup Cookbook

Not applicable

Httpclient object in JavaScrypt, Python, and Java Callouts all good options to handle mashups. I like implementing mashups with Async module in Node.js.

Pro tip: Be careful when performing sequential calls as they can introduce high latency in your APIs. So, with Async module switching from serial to parallel calls is as simple as renaming the function.

If you'd like to get a benchmark on how serial calls can impact your API, take a look at the following Lyrics apiproxy tutorial, which can be deployed to Edge. Cheers!