À la carte
Most samples run on any infrastructure. Pick the architecture you care about, then layer the samples that matter to you.
Deploy high-fidelity Azure API Management infrastructures and experiment with real-world policies. Not too much, not too little. Just right.
Five pre-built Azure architectures, from a simple public APIM instance through to Front Door, Application Gateway, Private Link, and VNet-injected designs.
Real-world policy examples covering authentication, load balancing, cost allocation, OAuth credential management, and more.
Most samples run on any infrastructure. Pick the architecture you care about, then layer the samples that matter to you.
A browser-based slide deck walks you through the architectures and samples. Self-contained — save the page and present offline!
Each architecture is deployed with a single Jupyter notebook and torn down just as easily. These high-fidelity environments let you explore network patterns, private connectivity, and ingress design without building a full landing zone.
Just the basics with a publicly accessible APIM instance. The innermost way to experience and experiment with APIM policies. Deploys in about five minutes.
Fastest · Lowest CostAPIs implemented in containers running on Azure Container Apps. Contrast calls through APIM against direct container endpoints to feel the difference the gateway makes.
A secure implementation with Azure Front Door connecting to APIM via Private Link. Traffic rides entirely on Microsoft-owned networks once it passes Front Door.
Private LinkApplication Gateway reaches APIM through a private endpoint in a VNet subnet. APIM Standard V2 accepts the connection, with VNet-integrated Container Apps behind.
Private LinkFull VNet injection of APIM and Container Apps. APIM is shielded from any traffic unless it comes through Application Gateway. Maximum isolation.
VNet InjectionEach sample is a focused, runnable lab. Open the notebook, press Run All, then poke at the policies. If an infrastructure is not already deployed, the notebook will guide you through creating one.
Authentication and role-based authorisation against a mock HR API using JWT validation.
All infrastructuresAdvanced authentication across multiple APIs with reusable policy fragments and an APIM product.
All infrastructuresProxy and shape calls to Azure Maps through APIM to centralise keys, quotas, and telemetry.
All infrastructuresTrack and allocate API costs per business unit using subscriptions, Entra ID application tracking, and AI Gateway token/PTU tracking across both Azure OpenAI Chat Completions and Responses APIs, including streaming (SSE) token usage which is not simple to capture correctly in APIM.
All infrastructuresDynamic per-API CORS origin validation using custom policy fragments and a maintainable origin mapping.
All infrastructuresControl APIM outbound internet traffic by routing it through an Azure Firewall NVA in a hub/spoke topology with user-defined routes.
appgw-apim · appgw-apim-peBasic demonstration of sample setup and policy usage. The best first stop.
All infrastructuresPriority and weighted load balancing across backend pools for resilience and blue-green rollouts.
apim-aca · afd-apim-peAPIM stores and manages third-party OAuth tokens on the caller's behalf using Credential Manager.
All infrastructuresValet key pattern: APIM mints short-lived SAS tokens so callers never see storage credentials.
All infrastructuresFrom clone to a running APIM lab in under ten minutes. Codespaces is the fastest route because Python, Azure CLI, and Bicep are already installed.
Click Open in GitHub Codespaces above, or follow the local setup guide in the repository README.
Open infrastructure/simple-apim/create.ipynb and press Run All.
Deployment takes about five minutes.
Open any samples/*/create.ipynb and press Run All. The notebook will
find your infrastructure and deploy onto it.
Modify the policy XML, re-run the deployment cell, fire requests at the gateway, and watch the behaviour change.