WEB API Management: 1st Part

In this section, we'll explain WEB API Management. Now, from a higher level, it looks like Managing WEB API. So, here we will explain the following two things.

  1. You build a Web API and decide to do business with that. It means you want to sell that API, this is being done by many people. Let say you want to sell services like messaging service, phone call service. So, for that you will monetize.

  2. Scenario 2 is that you will be indirectly monetizing the APIs. It means that you will be doing business indirectly. Perfect example for that is your partner with some business gets access to your service. Basically, it will help other companies for the integrated experience.

So, once you decided that you will experience one of these scenarios, WEB API Management is considered best for you. Out of the box, it also helps to keep documentation side by side. Consider a scenario if you have given tons of API without documentation; this will be the worst scenario to handle. So, from a developer perspective if you are writing any API and you want to put the documentation, then WEB API management is again a good choice.

One more scenario that I would like to emphasis here is let assume you want to launch marketing campaign and you don't have analytics embedded with the API; then you can't even think of doing that. However, with the website you can do that exclusively by incorporating Google Analytics and other stuffs. But, if you are writing any API from scratch then you need to think of key management, access, analytics in the backend and other important things. With turnkey service API Management all these things will go away. So, I can have any WEB API hosted anywhere on any service provider, but Azure WEB API Management will be in front of that. So, as you can see in the following screenshot, developers develop/write APIs that calls their APIs via Azure proxy. And this is where all magic happens, like analytics and other much needed behavior for WEB API is done here.



Figure 1: WEB API

Now, from Azure portal you can create WEB API management as in the following screenshot.





Figure 2: WEB API using Azure portal



Figure 3: Create a New API Management Service 1



Figure 4: Create a New API Management Service 2



Figure 5: Open the publisher portal

Once, the API management, portal gets created, you can go ahead and click on Manage link. This will open a new dashboard for API Management as in the following screenshot.



Figure 6: DashBoard

Now, here you can do all sort of things like adding new API or importing an existing API and set bunch of rules on it and then monitor it on timely basis.

Figure 7: Add New API

Then, you can add operations to it as shown in the following screenshot with the documentation to do that.



Figure 8: API Movies



Figure 9: New Operations

Once added successfully, it will bring you back to the original screen as shown in the following screenshot with API added.



Figure 10: Operation Setting Saved

Next thing I need to do is to add it in the products. Now, this is the place where you can change the behavior or apply policies. Here, you will add your APIs to the product. Following is the screenshot.



Figure 11: Products
Figure 12: Add new Products


Figure 13: New product Saved



Figure 14: Product API Demo

Figure 15: Add API to Product



Figure 16: Summary of Product API demo

Now, once I have added the API to the products page. I need to publish it as well.



Figure 17: Publish Demo

Once done, I will click on developer portal link that will open developers dashboard for that. Therefore, as I said there are two things,  publisher and developers. We have published our API first and now it is available for developer portal.



Figure 18: Devloper Portal

Now, when you click on APIs link, it will list your newly added API.



Figure 19: My View API

Now, the following you can see variety of options to call the API in other words from different backend. One point to note here is that in order to make a request you need to have a valid subscription id, else this will lead to 401 error message as shown below.



Figure 20: Error

However, you can do that from the Azure window itself.



Figure 21: View API Azure Window



Figure 22: HTTP request View

Now, this is the actual API http://moviereview.rahulsahay.com/api/movies that is getting fetched via Azure WEB API proxy.



Figure 23: Output

Once this is done, you can now check it's analytics in the API Management window as given in the following screenshot.



Figure 24: Final Output

With this, I would like to end this session here. We will delve more in the future session on that. Until then stay tuned and Happy Coding.


Similar Articles