Warning

This has some slight changes to formatting. I intend on making M9E a way to do this entirely with the CLI, its already close but its missing some key info.

API - Level I Route

Create an API Management instance

  1. Create a resource group for the resources needed for this exercise. Replace myResourceGroup with a name you want to use for the resource group. You can replace eastus2 with a region near you if needed. If you already have a resource group you want to use, proceed to the next step.
    Code
az group create --location eastus2 --name myResourceGroup
  1. Create a few variables for the CLI commands to use, it reduces amount of typing. Replace myLocation with the value you chose earlier. The APIM name needs to be a globally unique name, and the following script generates a random string. Replace myEmail with an email address you can access. Customize the contents of myApiName.
    Code
myApiName=ajohnson-apim-test
myLocation=myLocation
myEmail=myEmail
  1. Create an APIM instance. The az apim create command is used to create the instance. Replace myResourceGroup with the value you chose earlier.
    Code
az apim create -n $myApiName \
    --location $myLocation \
    --publisher-email $myEmail  \
    --resource-group myResourceGroup \
    --publisher-name Import-API-Exercise \
    --sku-name Developer 
Note

The operation should complete in about five minutes.

Import a Backend API (Portal)

This section shows how to import and publish an OpenAPI specification backend API.

  1. In the Azure portal, search for and select API Management services.
  2. On the API Management services screen, select the API Management instance you created.
  3. In the API management service navigation pane, select > APIs and then select APIs.
    image.
  4. Select OpenAPI in the Create from definition section, and set the Basic/Full toggle to Full in the pop-up that appears.
    Screenshot of the OpenAPI dialog box. Fields are detailed in the following table.
    image2

Use the values from the following table to fill out the form. You can leave any fields not mentioned to their default value.

Setting Value Description
OpenAPI Specification https://bigconference.azurewebsites.net/ References the service implementing the API, requests are forwarded to this address. Most of the necessary information in the form is automatically populated after you enter this value.
URL Scheme Select HTTPS Defines the security level of the HTTP protocol accepted by the API.
  1. Select Create.

Configure the API settings

The Big Conference API is created. Now it's time to configure the API settings.

  1. Select Settings in menu.
  2. Enter https://bigconference.azurewebsites.net/ in the Web service URL field.
  3. Deselect the Subscription required checkbox.
  4. Select Save.

Test the API

Now that the API has been imported and configured it's time to test the API.

  1. Select Test in the menu bar. This will display all of the operations available in the API.
  2. Search for, and select the Speakers_Get operation.
  3. Select Send. You may need to scroll down on the page to view the HTTP response.
  4. Backend responds with 200 OK and some data.