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.
Once the OpenAPI Definition is generated, Come back to API Management Portal and navigate to Add API Screen.
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.
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.