Monday, November 26, 2012

Video blog: Service composition / orchestration to SaaS with the Axway/Vordel API Gateway

Ross Mason from Mulesoft recently wrote an article entitled "With SaaS, it’s not just about your apps — it’s how you connect those apps, too". This is very true. APIs are what are used to connect apps together, and, as Ross explains, it frequently makes sense to orchestrate them, to achieve a greater business purpose.

For this reasons, a frequently-asked question about the Axway/Vordel API Gateway is "Can you orchestrate or compose two APIs using it?". Indeed this is possible, and quite easy to setup. Frequently, you wish to call one API and then use the output of that API as an input into another API, for example a SaaS API like SalesForce.com. 

In this video blog, I'm showing how to call an email verification API, to check the validity of an email address, prior to calling the SalesForce API. The Axway/Vordel API Gateway orchestrates the calls to both APIs as part of one "circuit" or policy. Below, I have put a diagram of the flow:


First let's walk through at the scenario. It's a familiar scenario where an organization has a web form which is filled out, and the information is inserted as a lead into Salesforce.com. We wish to check, firstly, if the email entered into the form is valid. Here's the scenario explained:

video

So, firstly lets see how a policy is configured on the Axway/Vordel API Gateway, using drag and drop, to connect directly to SalesForce, to send information from a Web form up to SalesForce, using the SalesForce API. Notice how this policy makes use of a "Policy Package", placed into a grouping in Policy Studio called "Cloud":


video

Once we have made our simple policy, we wire it up to a path on the API Gateway so that requests from the Web form result in a call to the SalesForce API:


video

Now we are in a position to post our Web form, which results in the information from the form being sent up to SalesForce through its API. Remember we haven't orchestrated in the email verification API yet. So, the bogus email makes it through fine.

video


Next we do the actual API orchestration. We add in the callout to the email verification API. Let's see how that is done:


video


At this point, we now have our service orchestration in action. The Axway/Vordel API Gateway has composed the two APIs together. If the response from the email verification API is a success, then we call the Salesforce API.

Let's see it in action:

video

Now let's take a closer look at how the response from the callout to the email verification API is used to check if the email is valid or not:

video

Finally, one of the most important aspects of orchestrating APIs is that you can apply SLAs (Service Level Agreements) and reporting to the APIs you are calling. This is especially important for SaaS services which you're paying for, such as Salesforce.com. Let's see how this is done with the Axway/Vordel API Gateway:


video
In this video blog, we saw application orchestration to a SaaS service via APIs, using the Axway/Vordel API Gateway. If you want to test this in action yourself, you can get your own free copy of the Axway/Vordel API Gateway from the here.