title | description | services | documentationcenter | author | manager | editor | ms.service | ms.workload | ms.tgt_pltfrm | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Import an API App as an API with the Azure portal | Microsoft Docs |
This tutorial shows you how to use API Management (APIM) to import API App as an API. |
api-management |
vladvino |
cfowler |
api-management |
mobile |
na |
tutorial |
04/22/2020 |
apimpm |
This article shows how to import an API App as an API. The article also shows how to test the APIM API.
In this article, you learn how to:
[!div class="checklist"]
- Import an API App as an 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
- Make sure there is an API App in your subscription. For more information, see App Service Documentation
[!INCLUDE api-management-navigate-to-instance.md]
-
Navigate to your API Management service in the Azure portal and select APIs from the menu.
-
Select API App from the Add a new API list.
-
Press Browse to see the list of API Apps in your subscription.
-
Select the app. APIM finds the swagger associated with the selected app, fetches it, and imports it.
In case APIM does not find swagger, it exposes the API as a "pass-through" API.
-
Add an API URL suffix. The suffix is a name that identifies this specific API in this APIM instance. It has to be unique in this APIM instance.
-
Publish the API by associating the API with a product. In this case, the "Unlimited" product is used. If you want for the API to be published and be available to developers, add it to a product. You can do it during API creation or set it later.
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
- Unlimited
-
Enter other API settings. You can set the values during creation or configure them later by going to the Settings tab. The settings are explained in the Import and publish your first API tutorial.
-
Select Create.
Operations can be called directly from the Azure portal, which provides a convenient way to view and test the operations of an API.
-
Select the API you created in the previous step.
-
Press the Test tab.
-
Select some operation.
The page displays fields for query parameters and fields for the headers. One of the headers is "Ocp-Apim-Subscription-Key", for the subscription key of the product that is associated with this API. If you created the APIM instance, you are an administrator already, so the key is filled in automatically.
-
Press Send.
Backend responds with 200 OK and some data.
[!INCLUDE api-management-navigate-to-instance.md]
[!INCLUDE api-management-define-api-topics.md]
[!div class="nextstepaction"] Transform and protect a published API