LinuxCommandLibrary

az-apim

Manage Azure API Management services

TLDR

List API Management services within a resource group

$ az apim list [[-g|--resource-group]] [resource_group]
copy

Create an API Management service instance
$ az apim create [[-n|--name]] [name] [[-g|--resource-group]] [resource_group] --publisher-email [email] --publisher-name [name]
copy

Delete an API Management service
$ az apim delete [[-n|--name]] [name] [[-g|--resource-group]] [resource_group]
copy

Show details of an API Management service instance
$ az apim show [[-n|--name]] [name] [[-g|--resource-group]] [resource_group]
copy

Update an API Management service instance
$ az apim update [[-n|--name]] [name] [[-g|--resource-group]] [resource_group]
copy

SYNOPSIS

az apim [<subcommand>] [--debug] [--help -h] [--output -o] [--query] [--subscription] [--verbose]

PARAMETERS

--debug
    Increase logging verbosity to show all debug logs.

--help -h
    Show this help message and exit.

--output -o
    Output format. [table|tsv|json|jsonc|none]

--query
    JMESPath query string for output filtering.

--subscription
    Name or ID of Azure subscription.

--verbose
    Increase logging verbosity (use --debug for full logs).

DESCRIPTION

az apim is an Azure CLI command group for managing Azure API Management (APIM) resources. APIM is a fully managed service that helps publish, secure, transform, maintain, and monitor APIs across clouds and on-premises.

Key capabilities include creating/updating service instances, APIs, products, operations, policies, users, groups, backends, and more. It supports DevOps automation, CI/CD integration, and scripting for scalable API gateways.

Commands operate on APIM instances within resource groups. Prerequisites: Install Azure CLI (≥2.0), run az login, and have Contributor role on the APIM resource. Most subcommands require --resource-group and --service-name arguments.

Ideal for developers, architects, and admins handling hybrid/multi-cloud API ecosystems. Supports OpenAPI imports, policy fragments, SSO tokens, and network status checks.

CAVEATS

Requires Azure CLI installation and authentication via az login. Needs appropriate RBAC permissions (e.g., Contributor). Some features are region-specific or preview-only. Subcommands often mandate --resource-group and --service-name. Not for direct API calls; use for CLI automation.

MAIN SUBCOMMANDS

api, product, user, policy, backend, group, service (full list via az apim --help)

COMMON USAGE

az apim service create --resource-group myRG --name myApim --location eastus --sku Developer
az apim api list --resource-group myRG --service-name myApim

HISTORY

Introduced in Azure CLI 2.0 (2018) alongside APIM service launch. Evolved with APIM v2/v3 tiers, adding support for workspaces, Git integration, and OpenAPI 3.0 in CLI 2.20+ (2021). Tracks Azure APIM roadmap for managed identities and virtual networks.

SEE ALSO

az(1), az-login(1), az-account(1)

Copied to clipboard