Import an OpenAPI specification

This article shows how to import an "OpenAPI specification" back-end API residing at This back-end API is provided by Microsoft and hosted on Azure. The article also shows how to test the APIM API.


See this document for important information and tips related to OpenAPI import.

In this article, you learn how to:

  • Import an "OpenAPI specification" back-end API
  • Test the API in the Azure portal
  • Test the API in the Developer portal


Complete the following quickstart: Create an Azure API Management instance

Go to your API Management instance

  1. In the Azure portal, search for and select API Management services.

    Select API Management services

  2. On the API Management screen, select your API Management instance.

    Select your API Management instance

Import and publish a back-end API

  1. Select APIs from under API MANAGEMENT.

  2. Select OpenAPI specification from the Add a new API list.

    OpenAPI specification

  3. Enter appropriate settings. You can set all the API values during creation. Alternately, you can set some of them later by going to the Settings tab.
    If you press tab some (or all) of the fields get filled up with the info from the specified back-end service.

    Create an API

    Setting Value Description
    OpenAPI Specification References the service implementing the API. API management forwards requests to this address.
    Display name Demo Conference API If you press tab after entering the service URL, APIM will fill out this field based on what is in the json.
    This name is displayed in the Developer portal.
    Name demo-conference-api Provides a unique name for the API.
    If you press tab after entering the service URL, APIM will fill out this field based on what is in the json.
    Description Provide an optional description of the API. If you press tab after entering the service URL, APIM will fill out this field based on what is in the json.
    API URL suffix conference The suffix is appended to the base URL for the API management service. API Management distinguishes APIs by their suffix and therefore the suffix must be unique for every API for a given publisher.
    URL scheme HTTPS Determines which protocols can be used to access the API.
    Products Unlimited Publish the API by associating the API with a product. To optionally add this new API to a product, type the product name. This step can be repeated multiple times to add the API to multiple products.
    Products are associations of one or more APIs. You can include a number of APIs and offer them to developers through the developer portal. Developers must first subscribe to a product to get access to the API. When they subscribe, they get a subscription key that is good for any API in that product. If you created the APIM instance, you are an administrator already, so you are subscribed to every product by default.
    By default, each API Management instance comes with two sample products: Starter and Unlimited.
  4. Select Create.


The API import limitations are documented in another article.

Test the new API in the Azure portal

Test API map

Operations can be called directly from the Azure portal, which provides a convenient way to view and test the operations of an API.

  1. Select the API you created in the previous step (from the APIs tab).

  2. Press the Test tab.

  3. Click on GetSpeakers. The page displays fields for query parameters, in this case none, and headers. One of the headers is "Ocp-Apim-Subscription-Key", for the subscription key of the product that is associated with this API. The key is filled in automatically.

  4. Press Send.

    Backend responds with 200 OK and some data.

Append other APIs

An API can be composed of APIs exposed by different services, including the OpenAPI Specification, a SOAP API, the API Apps feature of Azure App Service, Azure Function App, Azure Logic Apps, and Azure Service Fabric.

Import an API

To append a different API to your existing API, complete the following steps. When you import another API, the operations are appended to your current API.

  1. Go to your Azure API Management instance in the Azure portal.
  2. Select APIs from the menu on the left.
  3. Click ... next to the API that you want to append another API to.
  4. Select Import from the drop-down menu.
  5. Select a service from which to import an API.

Next steps