wkaczurba

Discover the API Management Service

Tutorial: here

API management components:

What are the differences between:

Products: open/protected

Groups: administrators, developers, guests

Policies

Managing:

Policies

Policy configuration

Policyh expressions:

Example

Creating advanced policies

Code samples are here

Securing subscription

## Securing APIs by using certs.

Accepting client certs in the Consumption tier

More: here

Exercise - creating an API managment (src)

Creating an APIM (API Management) instance

GIST: https://gist.github.com/wkaczurba/d38753d32f595d4b663dcdc84579cd1f

#!/bin/bash

# Login if not created:
#az login

echo "Specify your email:"
read MY_EMAIL

RESOURCE_GROUP=apim-demo1-rg
MY_APIM_NAME=apim-$RANDOM
MY_LOCATION=westeurope
PUBLISHER_NAME="APIDemo_Publisher"

echo MY_EMAIL=$MY_EMAIL
echo RESOURCE_GROUP=$RESOURCE_GROUP
echo MY_APIM_NAME=$MY_APIM_NAME
echo MY_LOCATION=$MY_LOCATION
echo PUBLISHER_NAME=$PUBLISHER_NAME

if [ $(az group exists --name $RESOURCE_GROUP) = false ]; then
    echo Creating resource group $rg:
    az group create --resource-group $RESOURCE_GROUP --location westeurope
else
    echo Resource group $RESOURCE_GROUP exists. Not creating.
fi

echo Creating APIM...
az apim create -n $MY_APIM_NAME \
    --location $MY_LOCATION \
    --publisher-email $MY_EMAIL  \
    --resource-group $RESOURCE_GROUP \
    --publisher-name $PUBLISHER_NAME \
    --sku-name Consumption

Then go to APIM, create new API - from https://conferenceapi.azurewebsites.net/?format=json

After importing:

Then the backend spec.:

Go into API -> select “Settings”

Test -> from “Test tab”

TODO:

Elaborate on security of APIM:

TODO2:

Discuss caching + caching policies.