liveBook · Manning

Azure API Management

As explained in Microsoft Azure in Action

Azure API Management is a managed Azure service for publishing, securing, transforming, monitoring, analyzing, and distributing APIs.

Suppose partners need to use your image-processing and sharing services, but those services live in different places. Azure API Management brings them together as an API that you can manage, monitor, and distribute. Developers can subscribe and use its functionality in their own applications. section 8.4

The API gateway sits between client applications and backend services: every request to the API host passes through it. That separation lets you change or fix a backend without requiring clients to change the public endpoints they call. section 8.4.1

A practical route from existing services to an API is:

  • Create an API Management instance with the Azure CLI. Choose a resource group, unique instance name, publisher name and email, location, and SKU; the demonstrated SKU is Consumption. section 8.4
  • In the Azure portal, select the Function App API template, choose a Function App, and set its display name, name, and URL suffix. This template exposes every Azure Function in that app as an endpoint, so check what the app contains. section 8.4.4
  • Use the API’s Test tab to send a request with the required template parameters. If the image-copy request fails, check that the linked storage account has the needed blob containers. section 8.4.4
C: /> az apim create --name alpacaapim --resource-group AlpacaRG 
--publisher-name alpacamabags --publisher-email admin@alpacamabags.com 
--location australiaeast --sku-name consumption --no-wait

The CLI command shows the instance-creation options together, including the publisher details and Consumption SKU. Replace its example names and email before running it. section 8.4

One API, two serverless jobs

An image-copy Azure Function can become a GET endpoint: send an image filename, and the Function creates a copy in Blob Storage. A second endpoint could call a Logic App to retrieve an image by ID and post it with a description. There is a catch: that Logic App needs an HTTP trigger, not just a blob trigger. Adding authentication to its incoming request is a further challenge; it is not automatic merely because the endpoint is published. section 8.4.4 section 8.4.5

This is a starting workflow, not a full tour of API Management. Before inviting third parties in, pay particular attention to which Functions the template exposes and how incoming requests will be authenticated. section 8.4.4 section 8.4.5

How Microsoft Azure in Action covers it

How deep it goes
Walks through instance creation, Function integration, and endpoint testing, but leaves Logic App integration as a challenge and broader features unexplored.
Examples
Tests an image-copy Function endpoint and proposes an HTTP-triggered Logic App that posts an image.
What it assumes
Assumes an existing Function App and Logic App plus some Azure CLI familiarity; introduces API Management instance creation and integration.
What you can do after
Apply it via Azure CLI and the Azure portal to create an instance, expose a Function App, and test an endpoint.
How it connects
Links the API gateway with Azure Functions, Logic Apps, HTTP triggers, Blob Storage, and authentication.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microsoft Azure in Action. The section links point to the parts of the book it draws on.