Skip to main content

What is Azure API Apps and how it is used?

Introduction

Microsoft Azure provides the facility to build and host own APIs on the cloud. It provides a centralized solution which can be used over cloud/network, now a day we need to develop our application which supports multiple platforms like Desktop, mobile, and tablet. Technology may be different to develop these types of platform supported application, our APIs development may reduce your cost, no need to develop API in different technology (iPhone, Android, .NET, Java etc…), choose any one technology to develop an APIs and use it over deferent platforms.

Microsoft Azure app Service API apps offer secure and flexible development, easy deployment including continuous delivery, accessing On-Premises data, Web jobs for background processing, high availability and scaling options for any sized RESTful API Applications. Use frameworks and templates to create RESTful APIs in seconds. Azure API apps are well known for automatic OS patching. You can use any tool or an operating system to develop your RESTful API with .NET, Java, Node.js, PHP or Python.

Why API Apps

If you want to build and deploy your APIs on a secure platform and also want to the scalable facility then use Microsoft Azure API App, here you can host your easily. You can develop your APIs application using multiple languages like Python, C#, PHP etc… It supports multiple frameworks like Node JS, ASP.NET Web API, and more. Azure API Apps can also be used for integration scenarios to leverage workflows using Azure Logic Apps.

Some points are mentioned below to memories as per interview

§  Fastest and easy way to build product development.
§  Provision and deploy fast and consume API.
§  Simple develop, host access control and authentication.
§  Secure platform, which scales automatically with hybrid connectivity.
§  New development experience with API features.
§  API definition for the Website host.
§  Swagger metadata, which is integrated with the API app.
§  Easy connectivity with all apps.

Continuous integration and Deployment

Azure API Apps also supports continuous deployment from your source control system. You can then use Azure App Service deployment slots to deploy your changes to a staging area. This allows developers to pre-qualify changes before they are promoted to production.

Authentication

If you wish to federate your authentication, then API Apps can be configured to use the following as Identity Providers:
§  Azure AD
§  Google
§  Facebook
§  Twitter
§  Microsoft

Building an API Application using Visual Studio and deploy it over Azure Cloud


Step 1: Create a new project.
Step 2: Select ASP.NET web application and set up the folder location to save the project.
Step 3:  Select “Azure API App” and click on create button, this will create a Web API project.
Step 4: In this step, you can see the following, API app is created, I made changes in controller get API code after deployment on Azure I will call this method.
Step 5: Right click on the Project and select Publish.
Step 6: Click on “Start” button and the following wizard will open.
 Step 7: If you have already logged-in then choose existing account otherwise click on create new. I have already an Azure account so I will log in on same. 
Step 9: After sign in, the following wizard will open. In this step you have to know about the options mentioned in below wizard:
App Name: This is required field and you have to choose a unique name and using this value, Azure will create a domain like <app name>.azurewebsites.net
Subscription: Choose option as per your account subscription if you have a free account then choose a free subscription.
Resource Group: Choose Resource Group if you have already if you want to create a new Resource Group then click on new.
Hosting Plan: Choose if you have already existing plan or can create a new one.
Application Insight: This is optional you can select none.
Step 10: Now click on the Create button, it will take a few minutes and your API App will be Host and looks like below.

On the Azure portal, API App looks like below.
Now you’re ready to access your APIs, using URL: http://<App Anme>. azurewebsites.net/api/value. Using PostMan you can access your all hosting API as below.