|
1 | 1 | ---
|
2 |
| -title: Import a Logic App as an API with the Azure portal | Microsoft Docs |
3 |
| -description: This article shows you how to use API Management to import a Logic App (Consumption) resource as an API. |
| 2 | +title: Import a logic app as an API by using the Azure portal | Microsoft Docs |
| 3 | +description: Learn how to use Azure API Management to import a logic app (Consumption) resource as an API. |
4 | 4 | services: api-management
|
5 | 5 | author: dlepow
|
6 | 6 | ms.service: azure-api-management
|
7 | 7 | ms.topic: how-to
|
8 |
| -ms.date: 04/16/2021 |
| 8 | +ms.date: 03/27/2025 |
9 | 9 | ms.author: danlep
|
| 10 | + |
| 11 | +#customer intent: As a developer, I want to import a logic app as an API. |
10 | 12 | ---
|
11 | 13 |
|
12 |
| -# Import a Logic App as an API |
| 14 | +# Import a logic app as an API |
13 | 15 |
|
14 | 16 | [!INCLUDE [api-management-availability-all-tiers](../../includes/api-management-availability-all-tiers.md)]
|
15 | 17 |
|
16 |
| -This article shows how to import a Logic App as an API and test the imported API. |
| 18 | +This article shows how to import a logic app as an API and test the imported API. |
17 | 19 |
|
18 | 20 | [!INCLUDE [api-management-workspace-availability](../../includes/api-management-workspace-availability.md)]
|
19 | 21 |
|
20 | 22 | In this article, you learn how to:
|
21 | 23 |
|
22 | 24 | > [!div class="checklist"]
|
23 | 25 | >
|
24 |
| -> - Import a Logic App as an API |
| 26 | +> - Import a logic app as an API |
25 | 27 | > - Test the API in the Azure portal
|
26 | 28 |
|
27 | 29 | > [!NOTE]
|
28 |
| -> API Management supports automated import of a Logic App (Consumption) resource. which runs in the multi-tenant Logic Apps environment. Learn more about [single-tenant versus multi-tenant Logic Apps](../logic-apps/single-tenant-overview-compare.md). |
| 30 | +> Azure API Management supports automated import of a Logic App (Consumption) resource, which runs in the multitenant Logic Apps environment. For more information, see [Differences between Standard single-tenant logic apps and Consumption multitenant logic apps](../logic-apps/single-tenant-overview-compare.md). |
29 | 31 |
|
30 | 32 | ## Prerequisites
|
31 | 33 |
|
32 |
| -- Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md) |
33 |
| -- Make sure there is a Consumption plan-based Logic App resource in your subscription that exposes an HTTP endpoint. For more information, [Trigger workflows with HTTP endpoints](../logic-apps/logic-apps-http-endpoint.md) |
| 34 | +- Complete the quickstart [Create an Azure API Management instance](get-started-create-service-instance.md). |
| 35 | +- Make sure there's a Consumption plan-based Logic App resource in your subscription that exposes an HTTP endpoint. For more information, see [Trigger workflows with HTTP endpoints](../logic-apps/logic-apps-http-endpoint.md). |
| 36 | + |
| 37 | +## Import and publish a backend API |
34 | 38 |
|
35 |
| -[!INCLUDE [api-management-navigate-to-instance.md](../../includes/api-management-navigate-to-instance.md)] |
| 39 | +1. Navigate to your API Management service in the [Azure portal](https://portal.azure.com). |
| 40 | +1. In the left menu, in the **APIs** section, select **APIs**, and then select **+ Add API**. |
36 | 41 |
|
37 |
| -## <a name="create-api"> </a>Import and publish a back-end API |
| 42 | +1. Select **Logic App** in the **Create from Azure resource** list: |
38 | 43 |
|
39 |
| -1. Navigate to your API Management service in the Azure portal and select **APIs** from the menu. |
40 |
| -1. Select **Logic App** from the **Add a new API** list. |
| 44 | + :::image type="content" source="./media/import-logic-app-as-api/logic-app-select.png" alt-text="Screenshot that shows the Logic App tile."::: |
41 | 45 |
|
42 |
| - :::image type="content" source="./media/import-logic-app-as-api/logic-app-select.png" alt-text="Select logic app category"::: |
| 46 | +1. Select **Browse** to see the list of logic apps that have HTTP trigger in your subscription. (Logic apps that don't have an HTTP trigger won't appear in the list.) |
43 | 47 |
|
44 |
| -1. Press **Browse** to see the list of Logic Apps with HTTP trigger in your subscription. |
45 |
| - * Logic apps *without* HTTP trigger will not appear in the list. |
| 48 | + :::image type="content" source="./media/import-logic-app-as-api/browse-logic-apps.png" alt-text="Screenshot that shows the Browse button." lightbox="./media/import-logic-app-as-api/browse-logic-apps.png"::: |
46 | 49 |
|
47 |
| - :::image type="content" source="./media/import-logic-app-as-api/browse-logic-apps.png" alt-text="Browse for existing logic apps with correct trigger"::: |
| 50 | +1. Select the logic app: |
48 | 51 |
|
49 |
| -1. Select the logic app. |
| 52 | + :::image type="content" source="./media/import-logic-app-as-api/select-logic-app-import-2.png" alt-text="Screenshot that shows the Select Logic App to import window." lightbox="./media/import-logic-app-as-api/select-logic-app-import-2.png"::: |
50 | 53 |
|
51 |
| - :::image type="content" source="./media/import-logic-app-as-api/select-logic-app-import-2.png" alt-text="Select logic app"::: |
| 54 | + API Management finds the Swagger document that's associated with the selected app, fetches it, and imports it. |
52 | 55 |
|
53 |
| -1. API Management finds the swagger associated with the selected app, fetches it, and imports it. |
54 |
| -1. Add an API URL suffix. |
55 |
| - * The suffix uniquely identifies this specific API in this API Management instance. |
| 56 | +1. Add an API URL suffix. The suffix uniquely identifies the API in the API Management instance. |
56 | 57 |
|
57 |
| - :::image type="content" source="./media/import-logic-app-as-api/create-from-logic-app.png" alt-text="Finish up fields"::: |
| 58 | + :::image type="content" source="./media/import-logic-app-as-api/create-from-logic-app.png" alt-text="Screenshot that shows values entered in the Create from Logic App window." lightbox="./media/import-logic-app-as-api/create-from-logic-app.png"::: |
58 | 59 |
|
59 |
| -1. If you want the API to be published and available to developers, Switch to the **Full** view and associate it with a **Product**. We use the *"Unlimited"* product in this example. |
60 |
| - * You can add your API to a product either during creation or later via the **Settings** tab. |
| 60 | +1. If you want the API to be published and available to developers, switch to the **Full** view and associate the API with a **Product**. This example uses the **Unlimited** product. (You can add your API to a product when you create it or later via the **Settings** tab.) |
61 | 61 |
|
62 | 62 | >[!NOTE]
|
63 |
| - > Products are associations of one or more APIs offered to developers through the developer portal. First, developers must subscribe to a product to get access to the API. Once subscribed, they get a subscription key for any API in that product. As creator of the API Management instance, you are an administrator and are subscribed to every product by default. |
| 63 | + > Products are associations of one or more APIs offered to developers via the developer portal. First, developers must subscribe to a product to get access to the API. After they subscribe, they get a subscription key for any API in the product. As creator of the API Management instance, you're an administrator and are subscribed to every product by default. |
64 | 64 | >
|
65 |
| - > Each API Management instance comes with two default sample products: |
| 65 | + > In certain tiers, each API Management instance comes with two default sample products: |
66 | 66 | > - **Starter**
|
67 | 67 | > - **Unlimited**
|
68 | 68 |
|
69 |
| -1. Enter other API settings. |
70 |
| - * You can set these values during creation or later by going to the **Settings** tab. The settings are explained in the [Import and publish your first API](import-and-publish.md#import-and-publish-a-backend-api) tutorial. |
| 69 | +1. Enter other API settings. You can set these values when you create the API or later by going to the **Settings** tab. The settings are explained in the [Import and publish your first API](import-and-publish.md#import-and-publish-a-backend-api) tutorial. |
| 70 | + |
71 | 71 | 1. Select **Create**.
|
72 | 72 |
|
73 | 73 | ## Test the API in the Azure portal
|
74 | 74 |
|
75 |
| -Operations can be called directly from the Azure portal, which provides a convenient way to view and test the operations of an API. |
| 75 | +You can call operations directly from the Azure portal. This method provides a convenient way to view and test the operations of an API. |
76 | 76 |
|
77 |
| -:::image type="content" source="./media/import-logic-app-as-api/test-logic-app-api.png" alt-text="Test the logic app"::: |
| 77 | +:::image type="content" source="./media/import-logic-app-as-api/test-logic-app-api.png" alt-text="Screenshot that shows the steps for testing an API." lightbox="./media/import-logic-app-as-api/test-logic-app-api.png"::: |
78 | 78 |
|
79 |
| -1. Select the API you created in the previous step. |
80 |
| -2. Press the **Test** tab. |
81 |
| -3. Select the operation you want to test. |
| 79 | +1. Select the API that you created in the previous step. |
| 80 | +1. On the **Test** tab, select the operation that you want to test. |
82 | 81 |
|
83 | 82 | * The page displays fields for query parameters and headers.
|
84 |
| - * One of the headers is "Ocp-Apim-Subscription-Key", for the product subscription key associated with this API. |
85 |
| - * As creator of the API Management instance, you are an administrator already, so the key is filled in automatically. |
86 |
| - |
87 |
| -4. Press **Send**. |
| 83 | + * One of the headers is `Ocp-Apim-Subscription-Key`. This header is for the product subscription key that's associated with the API. |
| 84 | + * As creator of the API Management instance, you're an administrator, so the key is filled in automatically. |
88 | 85 |
|
89 |
| - * When the test succeeds, the backend responds with **200 OK** and data. |
| 86 | +1. Select **Send**. When the test succeeds, the backend responds with **200 OK** and data. |
90 | 87 |
|
91 |
| -[!INCLUDE [api-management-navigate-to-instance.md](../../includes/api-management-append-apis.md)] |
| 88 | +[!INCLUDE [api-management-append-apis.md](../../includes/api-management-append-apis.md)] |
92 | 89 |
|
93 | 90 | >[!NOTE]
|
94 |
| ->Every Logic App has **manual-invoke** operation. To comprise your API of multiple logic apps and avoid collision, you need to rename the function. In order to rename the function/API, please navigate to the OpenAPI Specification editor and change the title value. |
| 91 | +>Every Logic App has a `manual-invoke` operation. If you want to combine multiple logic apps in an API, you need to rename the function. To rename the function/API, change the title value in the OpenAPI Specification editor. |
95 | 92 |
|
96 | 93 | [!INCLUDE [api-management-define-api-topics.md](../../includes/api-management-define-api-topics.md)]
|
0 commit comments