You are currently viewing Introduction to Azure API Management

Introduction to Azure API Management

Now a days, API business is very major business. There are many things which are exposed over APIs.

For ex. the flight ticket rates, the weather information/predictions, the currency exchange rate information, face recognition, translation of text, etc.

We all know that API is just a functionality exposed over HTTP. There are a lot of frameworks which can be used to create RESTful APIs. These frameworks also support documenting the APIs using OpenAPI / Swagger.

Swagger helps developers to understand contract definition for calling the RESTful API.

But if all of this is already available, then the obvious questions in my mind were why do we need Azure API management. This article tries to answer the below questions.

  • Why people use API management ?
  • What is Azure API management?
  • What additional benefits are provided by Azure API management ?

So, Why to use API management ?

API management provides a lot of capabilities – like authentication, logging and insights, developer portal, etc – which otherwise need to be developed.

Below section provides the information on capabilities provided by Azure API Management:

Proxy

API management is fundamentally a proxy which accepts requests from the API consumers. These proxies accept the HTTP requests from the consumers and based on policies the requests are redirected to your RESTful APIs.

Package and Publish your APIs

This is very fast and efficient way of packaging your APIs. In API Management, you can register many products. Every product contains number of APIs. And every API contains number of operations.

Self Service Portal

API management provides a developer portal where all the products / APIs / Operations are listed. Sample consumer code can also be published on the developer portal.

In addition to developer portal, the API management also provides the publisher portal. This is for API publishers. Using this publisher portal, the publishers can easily register new APIs or create new versions of existing APIs.

Insights

API management provides way to monitor health. This information can be very helpful to understand

Policies

API management provides ability to configure policies. Policy is the additional feature you want to add to the proxy layer. Policies may include throttling policies, caching policies, authentication policies, etc.

What is API Management ?

Below diagram shows the overall architecture of API management and where you code would be residing if you go with API management.

Below are the important terms to understand:

Frontend API

Essentially, API management creates a proxy in between consumers and API publishers. The applications created by partner ecosystem can use your API through this proxy.

This proxy API is also called as Frontend API in API management terminology.

Backend API

This is the RESTful API created by you. This API can be anywhere on the internet. It can be on Azure or any other cloud platform. It can be on-premise as well.

Products / APIs / Operations

Consider Product as a way of packaging your APIs together. Each product can contain one or more APIs. Each API can have one or more than one operations.

For ex. all the APIs related to face recognition can be packaged together as a product.

Developer Portal and Publisher Portal

This is already discussed above. Developer portal is to help developers to consume the APIs. Publisher portal is to help API publishers to add new APIs or to create new APIs.

Revisions

This capability is for API publishers. They can create different revisions of the APIs.

Versions

This capability is again for API consumers. This can help to create new version of existing APIs.

Please note that version is visible to API consumers while revision is not. The analogy of revision is with code check-in which is done by developers in their day-to-day work.

Where to use API Management ?

I have heard many people saying that just because the application has RESTful APIs, we can use API management in the application.

In my opinion, this is not valid criteria.

You should use API management when you / your organization intending to expose the APIs to the partner ecosystem. In this case, you will not have control over the API consumers. API management capabilities can help the partners.

e.g. Let’s say you want to expose a Currency Exchange Rate service which can be used by different mobile applications or web sites which offer hotel booking and flight ticket booking.

I hope this provides you sufficient information about Azure API Management service. Please comment and let me know your thoughts.

Leave a Reply