Lesson 3 of 6 Application Architecture Solutions

Designing API Integration with API Management

This lesson explains the API Management components, tiers and networking modes.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the API Management components.
  • Choose a tier for a capability.
  • Distinguish virtual network integration from injection.

Why an API gateway

As the number of APIs grows, each team may implement authentication, throttling and logging differently. An API gateway places these concerns in a single layer between clients and back ends, so that back ends can focus on business logic. It also decouples clients from implementation: a back end can move from a virtual machine to a container without changing the public API.

Azure API Management

Azure API Management is a platform for publishing, securing and monitoring APIs. It has three logical components. The gateway receives API calls and forwards them to back ends, enforcing policies. The management plane is how administrators configure the service. The developer portal lets API consumers discover and test APIs and obtain subscription keys.

Policies are the most important design tool. These are XML statements applied to requests and responses, which can validate a JSON Web Token, enforce rate limits, cache responses, transform payloads or rewrite URLs. Policies apply at global, product, API and operation scopes. Products group APIs for a particular audience, and subscriptions control access to them. Combined, they let an organization offer a free tier and a paid tier of the same API with different limits, without any change to the back end.

Choosing a tier

Tier selection is frequently tested, as networking and multi-region features differ greatly among tiers. There are classic tiers (Developer, Basic, Standard and Premium), newer v2 tiers (Basic v2, Standard v2 and Premium v2) and a Consumption tier.

CapabilityTiers that provide it
No SLA, for non-production useDeveloper
Serverless, per-call billingConsumption
Injection into a virtual networkDeveloper, Premium, Premium v2
Outbound connection to a virtual network back endDeveloper, Standard v2, Premium, Premium v2
Self-hosted gatewayDeveloper (one node), Premium
Multi-region deploymentPremium
Availability zonesPremium, Premium v2

Developer should never be used in production, because it has no SLA. Consumption suits lightweight, serverless use with unpredictable traffic. Standard v2 is a good choice when back ends are in a private network, but the gateway itself may be public. Premium is the only tier for multi-region gateways, and for self-hosted gateways in production, which let the gateway run on-premises or in other clouds, close to the APIs.

The following diagram shows the gateways of a Premium-tier API Management instance across regions and on-premises.

Why the Premium tier of API Management. One instance, managed from one place, has gateways in Azure regions in Europe and Asia through multi-region deployment, and a self-hosted gateway in the company's network that processes traffic to the on-premises back ends. Premium is the only production tier with both features.
The scenario is illustrative.
Sort into groups

Which API Management tier?

Exam skills 4.2.3

Choose the API Management tier for each requirement.

Log in to try this activity Interactive activities are free with an account.

Networking modes

Network integration comes in two forms, and the distinction appears in exam scenarios. Virtual network integration is outbound only: the gateway has a public endpoint, but can call private back ends. Virtual network injection deploys the gateway into a subnet, in external mode, with a public endpoint for inbound traffic, or in internal mode, reachable only through private addresses. Internal mode is often placed behind Application Gateway with a web application firewall, to publish chosen APIs to the internet while internal consumers go directly to the gateway.

Scenario questions

Integration or injection?

Exam skills 4.2.3

Choose the API Management networking mode for each requirement.

Log in to try this activity Interactive activities are free with an account.

Securing APIs

A secure API design layers several controls. Subscription keys identify the calling application, but they do not authenticate a user, so they should not be the only protection. OAuth 2.0 with Microsoft Entra ID is the recommended method, with a policy that validates tokens at the gateway. Managed identities allow API Management to authenticate itself to back ends. Mutual TLS can verify client certificates. Rate limits and quotas protect back ends from overload, and a web application firewall protects against common attacks.

API Management also acts as an AI gateway, applying token limits and load balancing across AI model deployments. Azure API Center is a separate service that catalogues all of an organization's APIs, whichever gateway they use, for discovery and governance. It does not process runtime traffic.

Match the pairs

Securing APIs

Exam skills 4.2.3

Match each API security need with the control that meets it.

Log in to try this activity Interactive activities are free with an account.
Worked example

Selecting an API Management tier

A company publishes APIs to partners. Its back ends are on-premises, and data must be processed by a gateway within its own network, for compliance. It also needs gateways in Azure regions in Europe and Asia, with an SLA, managed from one place. What should you recommend?

A gateway running on-premises is a self-hosted gateway, and gateways across multiple Azure regions require multi-region deployment. The Premium tier is the only production tier offering both, as Developer has no SLA.

Standard v2 connects to private back ends, but it provides neither multi-region deployment nor a self-hosted gateway. Azure API Center catalogues APIs, but handles no traffic. Separate instances for each region could be built with a lower tier, but they would not be managed from one place, and on-premises processing would still be missing.

Check yourself

Why are subscription keys alone not sufficient to secure an API?

Show answer

They identify the calling application rather than authenticating a user. OAuth 2.0 with token validation should be added.

Exam Tips

Remember for the exam

  • API Management has a gateway, a management plane and a developer portal.
  • Policies apply at global, product, API and operation scope.
  • Premium alone offers multi-region and production self-hosted gateways.
  • Integration is outbound only; injection places the gateway in a subnet.
  • Developer has no SLA, and must not be used in production.