The world of integration is changing really fast nowadays. It seems like only yesterday when everybody started to talk about SOA principles. In the last years many companies have done a heavy investment implementing their services in SOAP and REST/OData.
With the digital revolution there is a need of consume information on new ways, also companies need to expose their services to allow to developers to create new apps, everything has to be fast, easy to use, documented and of course secure.
Most SAP customers already have their interfaces built on PO/PI or Gateway, here is where API Management comes in, as a key end point in our landscape, to provide this information both internally and externally. But this new product it’s not limited to just traditional SAP landscapes API Management allows you to connect to any system, even other services outside your organization.
Some months ago we had the opportunity to experience SAP API management, first in the Beta program and then later in the customer validation.
During these sessions we had the chance to implement the scenario I’m going to explain:
One of our customers is a wholesale company that wants to improve their catalog of products, they are also trying to find new business opportunities and build the business case to fund the project.
They have already built many services in their landscape, but it’s still too complex.
They need a platform with the following attributes:
- Simple, scalable and secure.
- On boarding process for third party developers.
- Service discovery.
- Well documented
- Integrated with SAP.
- Role based
Solution: SAP API MANAGEMENT
In the following diagram we can see the current landscape of the wholesale company.
In terms of integration, they already have a Gateway server that exposes OData services to be consumed by UI5 Apps.
And they also have a PO box with some BPM process and EDI interfaces.
What we wanted to add, is an extra layer to manage APIs consuming resources from SAP Gateway.
These APIs could be consumed by mobile devices, message brokers, and even by developers inside the organisation.
Our target was to create two APIs:
- A public API to receive the catalog of products from multiple providers.
- A “Price Comparator”, the API that our customer is going to monetize.
And now let’s be hands on and build the scenario!
First we configure the connection to our Gateway box, and this is where we find the first issue. API manager doesn’t connect automatically with Cloud Connector (feedback has been shared with SAP and they will work on that).
By using the option to discover the service, in literally 2 minutes we have our first API available in the system.
- First we have to chose the system we want to connect to, in our scenario we are connecting to a gateway service.
- Then API Management will show us the list of services available in our system.
- Finally, we will choose one and will assign the base path we want to use to expose the data.
Once we have imported the service, API management will create the API in our system, reading all the documentation for the fields and services available in the gateway system.
We have our API imported, it’s time too add policies to our APIs. A policy is a program that executes a specific function at runtime and API management provides more than 20 policies out of the box.
One of the things I really like about API management is the new look and feel really easy to understand, within a few clicks our API has two policies: Check quota & check API key.
In the public API we are just checking the API Key to validate that is consumed by one of the configured applications.
Additionally, we added a quota policy in the Price Comparator, so we’ll be able to control and monetize our API (in future versions they will add more tools around this concept).
Once we have defined the APIs, we create some applications, it’ll be by subscribing to an Application how developers will get the key required to access the APIs.
And finally, after playing a bit with SOAP UI to automate my tests, these are the results displayed in a nice out of the box Lumira style dashboard.
I think SAP has done really smart move adding API Management in their portfolio, it’ll allow to existing customers to create their own APIs with a really low investment reusing what they have implemented in their PO/Gateway systems. It’s really easy to use, secure and the onboarding system allows to have a platform really developer friendly to discover the APIs avaiable in your organization.
I hope you found this blog useful!