How to import the definition of an API with operations in Azure API Management

In API Management, new APIs can be created and the operations added manually, or the API can be imported along with the operations in one step.

APIs and their operations can be imported using the following formats.

  • WADL
  • Swagger

This guide shows how create a new API and import its operations in one step. For information on manually creating an API and adding operations, see How to create APIs and How to add operations to an API.

Import an API

APIs are created and configured in the publisher portal. To access the publisher portal, click Publisher portal in the Azure Portal for your API Management service. If you have not yet created an API Management service instance, see Create an API Management service instance in the Get started with Azure API Management tutorial.

Publisher portal

Click APIs from the API Management menu on the left, and then click import API.

Import API

The Import API window has three tabs that correspond to the three ways to provide the API specification.

  • From clipboard allows you to paste the API specification into the designated text box.
  • From file allows you to browse to and select the file that contains the API specification.
  • From URL allows you to supply the URL to the specification for the API.

Import API format

After providing the API specification, use the radio buttons on the right to indicate the specification format. The following formats are supported.

  • WADL
  • Swagger

Next, enter a Web API URL suffix. This is appended to the base URL for your API management service. The base URL is common for all APIs hosted on each instance of an API Management service. API Management distinguishes APIs by their suffix and therefore the suffix must be unique for every API in a specific API management service instance.

Once all values are entered, click Save to create the API and the associated operations.

Note

For a tutorial of importing a basic calculator API in Swagger format, see Manage your first API in Azure API Management.

Export an API

In addition to importing new APIs, you can export the definitions of your APIs from the publisher portal. To do so, click Export API from the Summary tab of your API.

Export API

APIs can be exported using WADL or Swagger. Select the desired format, click Save, and choose the location in which to save the file.

Export API format

Next steps

Once an API is created and the operations imported, you can review and configure any additional settings, add the API to a Product, and publish it so that it is available for developers. For more information, see the following guides.