add-apim-api
Add APIM API
Section titled “Add APIM API”Scaffold a new API in Azure API Management with Bicep infrastructure.
1. Gather requirements
Section titled “1. Gather requirements”Collect from user or infer from context:
- API name — display name and kebab-case identifier (e.g.,
speeches-api) - Backend URL — the upstream service endpoint
- Path prefix — gateway path (e.g.,
/speeches) - Access — open (no subscription) or protected (subscription key required)
- Operations — method, URL template, parameters per operation
If protected, determine whether backend needs an API key from Key Vault.
Done when: all five fields known.
2. Scaffold files
Section titled “2. Scaffold files”Create in order:
infra/modules/api-management/apis/{api-name}.bicep— API definition with CORS, rate limiting, caching policiesinfra/modules/api-management/operations/{api-name}-operations.bicep— operation definitions following naming conventions below
Follow patterns in references/bicep-patterns.md for Bicep structure.
If backend API key needed:
infra/modules/api-management/named-values/{api-name}-key.bicep— Key Vault referenceinfra/modules/api-management/policies/{api-name}-policy.bicep— policy injecting the key
Done when: all files created and compile with az bicep build.
3. Wire up
Section titled “3. Wire up”Update existing modules:
infra/modules/api-management/api-management.bicep— add module referencesinfra/modules/api-management/products/{product-name}.bicep— associate API with product (if applicable)infra/main.bicepparam— add Front Door route (if new path prefix)
Done when: az bicep build --file infra/main.bicep succeeds.
Operation naming conventions
Section titled “Operation naming conventions”| Verb | Use | Example |
|---|---|---|
list | collection | listMinistries, listConsultations |
get | single item | getResponse, getCatalog |
create | new item | createSubscription |
update | modify | updateDocument |
delete | remove | deleteComment |
Rules:
- English identifiers, lowerCamelCase
list+ plural (listMinistries),get+ singular (getResponse)- Never
fetchorretrieve— uselistorget
📦 Source: soderlind/skills · Edit on GitHub