Markus Meyer
Markus's Techzone

Markus's Techzone

Create Azure API Management API Operation with Azure CLI

Markus Meyer's photo
Markus Meyer
·Oct 14, 2020·

1 min read

To create an Azure API Management API or Operation you have to use the current version of Azure CLI:

Install Azure CLI

Check installed version:

az --version

Install or update Azure CLI


Before creating the API you have to be logged in. Maybe you have to select the correct tenant.

az login


Please find the Microsoft documentation here:

az apim api create

az apim api operation create

The script requires an existing API Management:

$resourceGroupName = "eval.datatransformation"
$serviceName = "mm-sample"
$apiDisplayName="Lorem Ipsum"
$operationDescription="Gets the data"

az login

# create the API
az apim api create --service-name $serviceName  -g $resourceGroupName --api-id $apiId --path $apiPath --display-name $apiDisplayName

# create the Operation
az apim api operation create --service-name $serviceName  -g $resourceGroupName --api-id $apiId --url-template $operationPath --method "GET" --display-name $operationDisplayName --description $operationDescription


The API and operation is created:


Share this