Managing API In Azure

Introduction

In this article, I will explain about API management in Azure portal. Let’s get started talking about API management. API management can take any backend and launch a full API program based on it like securing the mobile infrastructure and enabling the ISV partner ecosystems and running the internal API programs.

Prerequisites

An active Azure subscription

Creating an API management

Step 1

Login to Azure portal.

Step 2

Click New -> Web+mobile API management.

 

Step 3

Now we need to configure the basic requirements given below.

  • Specify a unique name for the Service.
  • Select the subscription and resource group and location for the Service.
  • Specify a organization name and an Email ID will be automatically generated for the Service instance.
  • Click Create for the provision of the Service.
 

Step 4

The Service will be created and the next step is to import API. 

Step 5

An API can be created or can be imported and in this article, I will explain about importing API and I have uploaded a link for the source of a simple API like calculator and it is available from the link http://calcapi.cloudapp.net/calcapi.json

Step 6

An API is configured from the publisher portal and for this, you need to click the publisher portal.

 

Step 7

To import a simple calculator API, click APIs in the API management and click Import API.

 

Step 8

Now we need to configure the steps given below to configure and import the calculator API.

  • Click from the URL and enter the URL link http://calcapi.cloudapp.net/calcapi.json in specification document URL and click->swagger in the specification format.
  • In the Web API URL, suffix text box and type cal.
  • Finally click Save to import API.
 

Step 9

Now an API is imported and is displayed in the publisher notifications.

 

We can call for an operation in the developer portal and the operations can be directly called from the developer portal and it provides a convenient way to test the operations of an API.

Step 10

Click Developer portal and subsequently click APIs. Click APIs from menu and select the BASIC CALCULATOR for the available operations of it.

 

 

Step 11

In this basic calculator, I have selected to multiply two integers and similarly we can select adding two integers, subtracting and division of the two integers.

Step 12

For calling the multiplying two integer operations, click Try it.

 

Step 13

We can enter some value for the parameters or we can keep the default values. Click Send.

Step 14

The operation will be invoked and the developer displays in the portal; the response status and the response headers and the response content.

 

I hope you learned something new and thanks for reading.