In this scenario we will look at a case when you might combine Azure API Management and EAI Bridges from BizTalk Services. Imagine we have developed an EAI Bridge which is going to transform data and help us to expose an external web service which we want to consume. The bridge does some basic transformation logic and allows us to expose our own endpoint. We decide however that we want to create a great experience for external app developers to be able to use our bridge to consume some services so we will add the Azure API Management component in front of the API exposed by the EAI Bridge.
In the API Management module we start by defining the operations and product to create our API and we define a policy which allows us to expose JSON based services to the developers. When the call comes into the API Management proxy it will be converted from JSON to XML and then forwarded to our HTTP endpoint exposed by BizTalk Services EAI Bridges. When the bridge has done its job of connecting to the destination service and performing our action, the response is returned to the API Management proxy which converts the data back to JSON and returns the response to the caller.
The below diagram shows an example of this in action.
In addition to providing some conversion of data and a friendly interface for the developer, the API Management proxy also allows an important decoupling between the developer and the endpoint exposed by the EAI Bridge. As an example imagine we wanted to migrate to a new version of the bridge then the API Management proxy would make it easy to re-point the calls to a new url if required because the developer would not see this change.
The API proxy would also include the developer portal which would make it easy for us to create a positive experience for the developer to find and manage their relationship with our API and to test it. We would also be able to manage developers access through the API portal too.
In this scenario there is a clear seperation in the solution of the client facing API side of the solution which API management gives us a solid story with and the behind the scenes integration side of the solution which EAI Bridges can help us with in appropriate scenarios.
In summary I think any occasion where you are exposing an HTTP style endpoint from an EAI Bridge to other applications it is a good idea to consider using the Azure API Management proxy as it creates a separation between the interface of the service and the implementation which we all know is a good practice to follow.