← All field notes
CTO notes 2 min read

APIM Subscription Management (Cheat Sheet)

1️⃣ List All API Management Subscriptions ✅ Shows: Subscription Name, Display Name, and State. 2️⃣ Get Details of a Specific Subscription ✅ Shows: Creation Date, Scope, Expiry, and Status. 3️⃣ […]

1️⃣ List All API Management Subscriptions

az rest --method get --url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-name>/subscriptions?api-version=2021-08-01" --query "value[].{ID:id, Name:name, DisplayName:properties.displayName, State:properties.state}" --output table

Shows: Subscription Name, Display Name, and State.


2️⃣ Get Details of a Specific Subscription

az rest --method get --url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-name>/subscriptions/<subscription-name>?api-version=2021-08-01" --output json

Shows: Creation Date, Scope, Expiry, and Status.


3️⃣ List API Subscription Owners

az rest --method get --url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-name>/subscriptions?api-version=2021-08-01" --query "value[].{Name:name, Owner:properties.ownerId, State:properties.state}" --output table

Shows: Subscription Name, Owner ID, and Status.


4️⃣ List Subscriptions and Their Linked Products

az rest --method get --url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-name>/subscriptions?api-version=2021-08-01" --query "value[].{Name:name, Product:properties.scope}" --output table

Shows: Subscription Name and the APIM Product it’s linked to.


5️⃣ Export Subscription Data to a File

If you want to save the results to a JSON or CSV file:

az rest --method get --url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-name>/subscriptions?api-version=2021-08-01" --output json > apim_subscriptions.json

or for CSV format:

az rest --method get --url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-name>/subscriptions?api-version=2021-08-01" --query "value[].{Name:name, Product:properties.scope}" --output tsv > apim_subscriptions.csv

AS

Written by Alan Son

CTO judgment, grounded in delivery.

I build commercial AI products and help founders turn ambitious technical ideas into reliable production systems.

More about my work

Need an experienced technical partner?

Let’s work out the right next move.