You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-custom-api-host-deploy-call.md
+18-47Lines changed: 18 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,74 +5,45 @@ services: logic-apps
5
5
ms.suite: integration
6
6
ms.reviewer: estfan, azla
7
7
ms.topic: how-to
8
-
ms.date: 05/13/2020
8
+
ms.date: 08/13/2020
9
9
---
10
10
11
11
# Deploy and call custom APIs from workflows in Azure Logic Apps
12
12
13
-
After you [create your own APIs](./logic-apps-create-api-app.md) to use in your logic app workflows,
14
-
you need to deploy those APIs before you can call them.
15
-
You can deploy your APIs as [web apps](../app-service/overview.md),
16
-
but consider deploying your APIs as [API apps](../app-service/app-service-web-tutorial-rest-api.md),
17
-
which make your job easier when you build, host, and consume APIs
18
-
in the cloud and on premises. You don't have to change any code in your
19
-
APIs - just deploy your code to an API app. You can host your APIs on
20
-
[Azure App Service](../app-service/overview.md),
21
-
a platform-as-a-service (PaaS) offering that provides highly scalable,
22
-
easy API hosting.
23
-
24
-
Although you can call any API from a logic app,
25
-
for the best experience, add [Swagger metadata](https://swagger.io/specification/)
26
-
that describes your API's operations and parameters.
27
-
This Swagger document helps your API integrate more easily
28
-
and work better with logic apps.
13
+
After you [create your own APIs](./logic-apps-create-api-app.md) to use in your logic app workflows, you need to deploy those APIs before you can call them. You can deploy your APIs as [web apps](../app-service/overview.md), but consider deploying your APIs as [API apps](../app-service/app-service-web-tutorial-rest-api.md), which make your job easier when you build, host, and consume APIs in the cloud and on premises. You don't have to change any code in your APIs - just deploy your code to an API app. You can host your APIs on [Azure App Service](../app-service/overview.md), a platform-as-a-service (PaaS) offering that provides highly scalable, easy API hosting.
14
+
15
+
Although you can call any API from a logic app workflow, for the best experience, add [Swagger metadata](https://swagger.io/specification/) that describes your API's operations and parameters. This Swagger document helps your API integrate more easily and work better with logic app workflows.
29
16
30
17
## Deploy your API as a web app or API app
31
18
32
-
Before you can call your custom API from a logic app,
33
-
deploy your API as a web app or API app to Azure App Service.
34
-
To make your Swagger document readable by the Logic Apps Designer,
Before you can call your custom API from a logic app workflow, deploy your API as a web app or API app to Azure App Service.
20
+
To make your Swagger document readable by your workflow, set the API definition properties and turn on [cross-origin resource sharing (CORS)](../app-service/overview.md) for your web app or API app.
38
21
39
-
1. In the [Azure portal](https://portal.azure.com),
40
-
select your web app or API app.
22
+
1. In the [Azure portal](https://portal.azure.com), select your web app or API app.
41
23
42
-
2. In the app menu that opens,
43
-
under **API**, choose **API definition**.
44
-
Set the **API definition location**
45
-
to the URL for your swagger.json file.
24
+
1. In the app menu that opens, under **API**, select **API definition**. Set the **API definition location** to the URL for your swagger.json file.
Usually, the URL appears in this format: `https://{name}.azurewebsites.net/swagger/docs/v1)`
49
27
50
-

28
+

51
29
52
-
3. Under **API**, choose **CORS**.
53
-
Set the CORS policy for **Allowed origins** to **'*'** (allow all).
30
+
3. Under **API**, select **CORS**. Set the CORS policy for **Allowed origins** to **'*'** (allow all).
54
31
55
-
This setting permits requests from Logic App Designer.
32
+
This setting permits requests from the workflow designer.
56
33
57
-

34
+

58
35
59
-
For more information, see
60
-
[Host a RESTful API with CORS in Azure App Service](../app-service/app-service-web-tutorial-rest-api.md).
36
+
For more information, review [Host a RESTful API with CORS in Azure App Service](../app-service/app-service-web-tutorial-rest-api.md).
61
37
62
38
## Call your custom API from logic app workflows
63
39
64
-
After you set up the API definition properties and CORS,
65
-
your custom API's triggers and actions should be available
66
-
for you to include in your logic app workflow.
40
+
After you set up the API definition properties and CORS, your custom API's triggers and actions should be available for you to include in your logic app workflow.
67
41
68
-
* To view websites that have OpenAPI URLs,
69
-
you can browse your subscription websites in the Logic Apps Designer.
42
+
* To view websites that have OpenAPI URLs, you can browse your subscription websites in the workflow designer.
70
43
71
-
* To view available actions and inputs by pointing at a Swagger document,
72
-
use the [HTTP + Swagger action](../connectors/connectors-native-http-swagger.md).
44
+
* To view available actions and inputs by pointing at a Swagger document, use the [HTTP + Swagger action](../connectors/connectors-native-http-swagger.md).
73
45
74
-
* To call any API, including APIs that don't have or expose an Swagger document,
75
-
you can always create a request with the [HTTP action](../connectors/connectors-native-http.md).
46
+
* To call any API, including APIs that don't have or expose an Swagger document, you can always create a request with the [HTTP action](../connectors/connectors-native-http.md).
0 commit comments