How-To's: Azure API Management

Creating an API Management Service:

From the Azure portal, select 'Create a resource', then choose 'API Management'. Fill out the details, and then click 'Create' to provision your APIM instance.

Creating an API:

Once your APIM service is created, you can use the Azure portal to create an API. From your APIM service's page, select 'APIs', then click '+ Add API'. Fill out the details.

Creating a Product:

In the APIM service, select 'Products', then click '+ Add'. Fill out the product details and add the previously created API to this product.

Programmatic Deployments:

For programmatic deployments to your API, you can use Azure Resource Manager templates or Azure PowerShell. These tools allow you to automate the deployment and management of your APIs.

Setting Up a YAML Pipeline:

YAML pipelines in Azure DevOps can be used to automate the deployment of your APIs.

a. First, define your pipeline in a .yml file at the root of your repository.

b. In your Azure DevOps project, go to Pipelines, then click 'Create Pipeline'. Choose your repository and select your .yml file.

c. The pipeline can be triggered manually, or you can set it to be triggered automatically on changes to your repository.

Applying Policies:

From the APIM service in the Azure portal, select your API and then select a specific operation. Click on 'Add policy' to apply transformation, control flow, or other types of policies to your API operations.

Monitoring an API Management Service:

Azure provides built-in integration with Azure Monitor and Azure Application Insights for monitoring and diagnosing APIM services. You can monitor your APIM service from the Azure portal. From your APIM service's page, select 'Metrics' to see service usage, capacity, and other metrics.