Get startedGet started for free

Function app and API management service

1. Function app and API management service

Let's create an Azure Function App and API Management service in Azure! Together, we will walk through this setup. Function App is a very flexible Azure resource that can perform many different types of functionality, including hosting back-end API endpoints that the API Management service can be connected to. Compared to other Azure resources, it's the easiest to set up. It's serverless, which means that it's managed automatically by Azure infrastructure, leaving fewer things for us to worry about. We will start by opening the Azure Portal and creating an Azure Function app. We will opt for the Consumption tier, so we will pay only for actual executions, and the service scales down to zero when idle. We will pick our subscription and select the resource group. For the Function App’s name, enter something unique. Remember, Azure enforces a lowercase, alphanumeric convention. When it comes to the runtime stack, we would need to consider our use case. Python is ideal for quick data processing tasks or machine-learning triggers, C#/.NET offers deep integration with enterprise libraries and high performance, Node.js excels at real‑time, event‑driven workloads, Java supports existing Java ecosystems, and PowerShell is perfect for automation scripts. In our case, we will choose Python, as this is the language we will create our APIs in. Next, we would choose Linux if we want faster cold starts and typically lower costs, or Windows if we require specific Windows‑only features. We will select the region nearest to our end users to minimize latency. Once we review and confirm our settings, the deployment will begin. After creation, we can quickly test the Function App URL, add new functions, and configure triggers. Let's get ahead and create another resource. We will need an API Management instance, and to do so, we will type APIM, which stands for API Management. Once again, we will select the resource group, select the region, and name our resource. However, in this case, we will also need to provide an organization name and administrator email, which can be anything. This is mandatory for an API Management instance. The pricing tier should be Standard. And for our purpose, we will just need one unit. However, in production, we might consider Premium for multi-region deployments or Developer for low‑cost testing. We will choose the same region as our Function App to keep backend calls lightning‑fast. After we review and confirm, Azure will provision a secure gateway, developer portal, and management dashboard for our APIs, known as the Management Plane. Inside the Management Plane, we can add new APIs. We can choose the type of API to add, which can be HTTP, GraphQL, or gRPC. We’ll be able to import our Function App’s OpenAPI definition in just a few steps. If we scroll down on the API-creation page, we will see the option of creating an API from Azure resources. This is where we can choose an Azure Function App. Then, we can apply policies such as caching, authentication, rate limiting, and transformations. We can also publish our APIs for other people to see by navigating to the Developer portal option. This will take us to a page where we can customize the look and feel of API documentation and publish it. Now, it's your turn to create an Azure Function App!

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.