Using Azure API Management with Azure Function

Using Azure API Management with Azure Function

You can use Azure API Management with Azure Function to expose APIs from an Azure Function and distribute it securely. Azure API Management helps in manage, scale and distribute API securely to external developers, partners or even internal developers. We can configure and distribute the OpenAPI specification based API easily using Azure API Management Services. For an Azure Function, we have to enable and defined the Open API specification first before we pulling in Azure Function into API Management

Azure API Management with Azure Function Apps

You can enable the OpenAPI specification for Azure Function from API Definition. To do that, you can read this post – Generate the OpenAPI definition for Azure Function Apps that covers step by step process on how to configure Open API Definition for Azure Function.

Using Azure API Management with Azure Function - OpenAPI

Once the OpenAPI Definition is generated, Come back to API Management Portal and navigate to Add API Screen.

Using Azure API Management with Azure Function - Choose Function App

From the Add API Screen, choose “Function App” to add the Azure Function. This option will let you add the existing Azure Function Apps. Choose the open for which you have already enabled the OpenAPI specification.

Using Azure API Management with Azure Function - Select Azure Function

 

Related Post: Create Azure Functions using Visual Studio and deploy it to Azure

Once you select the Azure Function, API Management will pull up required details. You need to provide the API Prefix and then click on Create. It will take a while to import the function. Once the import is completed, you can access the Azure Function API Exposed through the API management.

Using Azure API Management with Azure Function - Function API

 

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.