Skip to content

Commit 3a240ef

Browse files
authored
Merge pull request #313377 from dksimpson/us544833-dks-5
Refresh article: Call endpoints for REST APIs from workflows in Azure Logic Apps (user story 556654)
2 parents 66aeff3 + 261f7b6 commit 3a240ef

1 file changed

Lines changed: 105 additions & 79 deletions

File tree

Lines changed: 105 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,142 +1,129 @@
11
---
2-
title: Call REST API Endpoints from Workflows
3-
description: Call the endpoint URL for a REST API from workflows in Azure Logic Apps.
4-
services: logic-apps
2+
title: Call REST APIs from Workflows with HTTP Swagger
3+
description: Call REST API endpoints from workflows in Azure Logic Apps by using HTTP Swagger operations.
4+
services: azure-logic-apps
55
ms.suite: integration
66
ms.reviewers: estfan, azla
77
ms.topic: how-to
88
ms.update-cycle: 365-days
9-
ms.date: 03/10/2026
10-
# Customer intent: As an integration developer who works with Azure Logic Apps, I want to call a REST endpoint from my workflow.
9+
ai-usage: ai-assisted
10+
ms.date: 03/23/2026
11+
# Customer intent: As an integration developer who works with Azure Logic Apps, I want to call a REST API endpoint URL from my workflow by using HTTP Swagger operations.
1112
---
1213

13-
# Call endpoints for REST APIs from workflows in Azure Logic Apps
14+
# Call REST API endpoints from workflows in Azure Logic Apps by using HTTP Swagger
1415

1516
[!INCLUDE [logic-apps-sku-consumption-standard](../../includes/logic-apps-sku-consumption-standard.md)]
1617

17-
To call a REST API endpoint from a logic app workflow in Azure Logic Apps, you can use the built-in **HTTP + Swagger** operations to call any REST API endpoint through a [Swagger file](https://swagger.io). The **HTTP + Swagger** trigger and action work the same as the [HTTP trigger and action](/azure/connectors/connectors-native-http) but provide a better experience in the workflow designer by exposing the API structure and outputs described by the Swagger file. To implement a polling trigger, follow the polling pattern that's described in [Create custom APIs to call other APIs, services, and systems from logic app workflows](/azure/logic-apps/logic-apps-create-api-app#polling-triggers).
18+
To call a REST API from your workflow in Azure Logic Apps without manually building a request, add the native, built-in **HTTP + Swagger** trigger or action to your workflow. These operations call any REST API endpoint by using a [Swagger file](https://swagger.io) to discover callable operations and get structured inputs and outputs.
19+
20+
The **HTTP + Swagger** trigger and action work the same as the [HTTP trigger and action](/azure/connectors/connectors-native-http), but they provide a better experience in the workflow designer by exposing the API structure and outputs described by the Swagger file.
21+
22+
This article shows how to add and use the **HTTP + Swagger** trigger and action in your workflow.
1823

1924
## Limitations
2025

21-
The **HTTP + Swagger** built-in operations currently support only OpenAPI 2.0, not OpenAPI 3.0.
26+
The **HTTP + Swagger** built-in operations support only OpenAPI 2.0, not OpenAPI 3.0.
2227

2328
## Prerequisites
2429

25-
* An Azure account and subscription. [Get a free Azure account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
30+
- An Azure account and subscription. [Get a free Azure account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
2631

27-
* The URL for the Swagger file that describes the target REST API endpoint that you want to call
32+
- The URL for the Swagger file that describes the target REST API endpoint to call.
2833

29-
Typically, the REST endpoint has to meet the following criteria for the trigger or action to work:
34+
Typically, the REST endpoint needs to meet the following criteria for the trigger or action to work:
3035

31-
* The Swagger file must be hosted on an HTTPS URL that's publicly accessible.
36+
- The Swagger file is hosted on a publicly accessible HTTPS URL.
3237

33-
* The Swagger file must contain an **operationID** property for each operation in the definition. If not, the connector only shows the last operation in the Swagger file.
34-
35-
* The Swagger file must have [Cross-Origin Resource Sharing (CORS)](/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) enabled.
36-
37-
> [!NOTE]
38-
>
39-
> To reference a Swagger file that's unhosted or that doesn't meet the security and cross-origin requirements,
40-
> you can [upload the Swagger file to a blob container in an Azure storage account](#host-swagger), and enable
41-
> CORS on that storage account so that you can reference the file.
42-
43-
* The Consumption or Standard logic app workflow from where you want to call the target endpoint. To start with the **HTTP + Swagger** trigger, create a logic app resource with a blank workflow. To use the **HTTP + Swagger** action, start your workflow with any trigger that you want. This example uses the **HTTP + Swagger** trigger as the first operation.
44-
45-
## Add an HTTP + Swagger trigger
46-
47-
This built-in trigger sends an HTTP request to a URL for a Swagger file that describes a REST API. The trigger then returns a response that contains that file's content.
38+
- The Swagger file contains an `operationID` property for each operation in the API definition. If not, the workflow designer shows only the last operation in the Swagger file.
4839

49-
1. In the [Azure portal](https://portal.azure.com), open your logic app resource and blank workflow in the designer.
40+
- The Swagger file needs to turn on [Cross-Origin Resource Sharing (CORS)](/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services).
5041

51-
1. Based on whether you have a Consumption or Standard workflow, [follow these general steps to add the **HTTP** trigger named **HTTP + Swagger**](/azure/logic-apps/create-workflow-with-trigger-or-action#add-trigger).
42+
> [!NOTE]
43+
>
44+
> To reference a Swagger file that's unhosted or doesn't meet security and cross-origin requirements, [upload the Swagger file to a blob container in an Azure storage account](#host-swagger), and enable CORS on that storage account.
5245
53-
1. In the **Swagger endpoint** box, enter the URL for the Swagger file that you want, and select **Add action**.
46+
- A Consumption or Standard logic app workflow where you want to call the REST API endpoint.
5447

55-
The following example uses a non-functional Swagger URL. Your URL might use a different format.
48+
To start your workflow with the **HTTP + Swagger** trigger, create a logic app resource that has a blank workflow. To use the **HTTP + Swagger** action, start your workflow with any trigger that works best for your business scenario.
5649

57-
:::image type="content" source="media/connectors-native-http-swagger/http-swagger-trigger-parameters.png" alt-text="Screenshot shows workflow designer with selected Add trigger shape and information pane for HTTP + Swagger trigger. The Swagger endpoint property is set to an example URL.":::
50+
## Add an HTTP + Swagger trigger
5851

59-
1. After the designer shows the operations described by the Swagger file, select the operation that you want to use.
52+
This trigger sends an HTTP request to the URL for a Swagger file that describes a REST API. The trigger returns a response that contains the Swagger file content to the workflow.
6053

61-
1. Provide the values for the trigger parameters, which vary based on the selected operation, that you want to include in the endpoint call.
54+
To implement a polling trigger, follow the [polling trigger pattern](/azure/logic-apps/logic-apps-create-api-app#polling-triggers).
6255

63-
1. If the trigger requires that you specify a firing schedule, specify the recurrence for how often you want the trigger to call the endpoint.
56+
1. In the [Azure portal](https://portal.azure.com), open your logic app resource.
6457

65-
1. To add other available parameters, open the **Advanced parameters** list, and select the parameters that you want.
58+
1. In the designer, open your blank workflow.
6659

67-
For more information about authentication types available for HTTP + Swagger, see [Add authentication to outbound calls](/azure/logic-apps/logic-apps-securing-a-logic-app#add-authentication-outbound).
60+
1. Based on whether your workflow is Consumption or Standard, follow the [general steps](/azure/logic-apps/add-trigger-action-workflow#add-trigger) to add the **HTTP** trigger named **HTTP + Swagger**.
6861

69-
1. Continue building your workflow with the actions that you want to run when the trigger fires.
62+
1. In the **Swagger endpoint** box, enter the URL for the Swagger file, and select **Add action**.
7063

71-
1. When you're done, save your workflow. On the designer toolbar, select **Save**.
64+
The following example shows an example Swagger URL format. Your URL might use a different format.
7265

73-
## Add an HTTP + Swagger action
66+
:::image type="content" source="media/connectors-native-http-swagger/http-swagger-trigger-parameters.png" alt-text="Screenshot that shows the Azure portal, workflow designer, and HTTP + Swagger trigger pane. An example URL is entered for the Swagger endpoint parameter.":::
7467

75-
This built-in action sends an HTTP request to the URL for the Swagger file that describes a REST API. The action then returns a response that contains that file's content.
68+
The trigger information pane shows the operations in the Swagger file.
7669

77-
1. In the [Azure portal](https://portal.azure.com), open your logic app resource and workflow in the designer.
70+
1. Select the operation you want.
7871

79-
1. Based on whether you have a Consumption or Standard workflow, [follow these general steps to add the **HTTP** action named **HTTP + Swagger**](/azure/logic-apps/create-workflow-with-trigger-or-action#add-action).
72+
1. For the selected operation, enter the parameter values to use in the REST API call.
8073

81-
1. In the **Swagger endpoint** box, enter the URL for the Swagger file that you want, and select **Add action**.
74+
Parameters vary based on the selected operation.
8275

83-
The following example uses a non-functional Swagger URL. Your URL might use a different format.
76+
1. If the trigger runs on a schedule, set up the recurrence to specify when the trigger calls the REST API.
8477

85-
:::image type="content" source="media/connectors-native-http-swagger/http-swagger-action-parameters.png" alt-text="Screenshot shows workflow designer with trigger named Fabrikam API - Create order and open information pane for HTTP + Swagger action. The Swagger endpoint property is set to a URL.":::
78+
1. If other parameters exist, open the **Advanced parameters** list, and select the parameters you want.
8679

87-
1. After the designer shows the operations described by the Swagger file, select the operation that you want to use.
80+
For more information about authentication, see [Add authentication to outbound calls](/azure/logic-apps/logic-apps-securing-a-logic-app#add-authentication-outbound).
8881

89-
1. Provide the values for the action parameters, which vary based on the selected operation, that you want to include in the endpoint call.
82+
1. Continue building the workflow with actions to run when the trigger fires.
9083

91-
1. To add other available parameters, open the **Advanced parameters** list, and select the parameters that you want.
84+
1. When you finish, save your workflow. On the designer toolbar, select **Save**.
9285

93-
For more information about authentication types available for HTTP + Swagger, see [Add authentication to outbound calls](/azure/logic-apps/logic-apps-securing-a-logic-app#add-authentication-outbound).
86+
## Add an HTTP + Swagger action
9487

95-
1. Continue building your workflow with any other actions that you want to run.
88+
This action sends an HTTP request to the URL for a Swagger file that describes a REST API. The action returns a response that contains the Swagger file content to the workflow.
9689

97-
1. When you're done, save your workflow. On the designer toolbar, select **Save**.
90+
1. In the [Azure portal](https://portal.azure.com), open your logic app resource.
9891

99-
<a name="host-swagger"></a>
92+
1. In the designer, open your blank workflow.
10093

101-
## Host Swagger in Azure Storage
94+
1. Based on whether your workflow is Consumption or Standard, follow the [general steps](/azure/logic-apps/add-trigger-action-workflow#add-action) to add the **HTTP** action named **HTTP + Swagger**.
10295

103-
You can still reference a Swagger file that's not hosted or that doesn't meet the security and cross-origin requirements. Upload the Swagger file to blob container in an Azure storage account and enable CORS on that storage account. To create, set up, and store Swagger files in Azure Storage, follow these steps:
96+
1. In the **Swagger endpoint** box, enter the URL for the Swagger file, and select **Add action**.
10497

105-
1. [Create an Azure storage account](/azure/storage/common/storage-account-create).
98+
The following example shows an example Swagger URL format. Your URL might use a different format.
10699

107-
1. Now enable CORS for the blob. On your storage account's menu, select **CORS**. On the **Blob service** tab, specify these values, and select **Save**.
100+
:::image type="content" source="media/connectors-native-http-swagger/http-swagger-action-parameters.png" alt-text="Screenshot that shows the Azure portal, workflow designer, and HTTP + Swagger action pane. An example URL is entered for the Swagger endpoint parameter.":::
108101

109-
| Property | Value |
110-
|----------|-------|
111-
| **Allowed origins** | `*` |
112-
| **Allowed methods** | `GET`, `HEAD`, `PUT` |
113-
| **Allowed headers** | `*` |
114-
| **Exposed headers** | `*` |
115-
| **Max age** (in seconds) | `200` |
102+
The action information pane shows the operations in the Swagger file.
116103

117-
Although this example uses the [Azure portal](https://portal.azure.com), you can use a tool such as [Azure Storage Explorer](https://storageexplorer.com/), or automatically configure this setting by using this sample [PowerShell script](https://github.com/logicappsio/EnableCORSAzureBlob/blob/master/EnableCORSAzureBlob.ps1).
104+
1. Select the operation you want.
118105

119-
1. [Create a blob container](/azure/storage/blobs/storage-quickstart-blobs-portal). On the container's **Overview** pane, select **Change access level**. From the **Public access level** list, select **Blob (anonymous read access for blobs only)**, and select **OK**.
106+
1. For the selected operation, enter the parameter values to use in the REST API call.
120107

121-
1. [Upload the Swagger file to the blob container](/azure/storage/blobs/storage-quickstart-blobs-portal#upload-a-block-blob), either through the [Azure portal](https://portal.azure.com) or [Azure Storage Explorer](https://storageexplorer.com/).
108+
Parameters vary based on the selected operation.
122109

123-
1. To reference the file in the blob container, get the HTTPS URL that follows this format, which is case-sensitive, from Azure Storage Explorer:
110+
1. If other parameters exist, open the **Advanced parameters** list, and select the parameters you want.
124111

125-
`https://<storage-account-name>.blob.core.windows.net/<blob-container-name>/<complete-swagger-file-name>?<query-parameters>`
112+
For more information about authentication, see [Add authentication to outbound calls](/azure/logic-apps/logic-apps-securing-a-logic-app#add-authentication-outbound).
126113

127-
## Connector technical reference
114+
1. Continue building the workflow with actions to run when the trigger fires.
128115

129-
This section provides more information about the outputs from an **HTTP + Swagger** trigger and action.
116+
1. When you finish, save your workflow. On the designer toolbar, select **Save**.
130117

131-
### Outputs
118+
## Outputs from HTTP + Swagger operations
132119

133-
The **HTTP + Swagger** call returns the following information:
120+
This section provides more information about the outputs from the **HTTP + Swagger** trigger and action. The **HTTP + Swagger** operation returns the following information:
134121

135122
| Property name | Type | Description |
136123
|---------------|------|-------------|
137-
| **headers** | Object | The headers from the request |
138-
| **body** | Object | The object with the body content from the request |
139-
| **status code** | Integer | The status code from the request |
124+
| **headers** | Object | The headers from the request. |
125+
| **body** | Object | The object with the body content from the request. |
126+
| **status code** | Integer | The status code from the request. |
140127

141128
| Status code | Description |
142129
|-------------|-------------|
@@ -148,8 +135,47 @@ The **HTTP + Swagger** call returns the following information:
148135
| 404 | Not Found |
149136
| 500 | Internal server error. Unknown error occurred. |
150137

151-
## Related content
138+
<a name="host-swagger"></a>
139+
140+
## Host the Swagger in Azure Storage
152141

153-
* [Managed connectors for Azure Logic Apps](/connectors/connector-reference/connector-reference-logicapps-connectors)
154-
* [Built-in connectors for Azure Logic Apps](/azure/connectors/built-in)
142+
You can still reference a Swagger file that's not hosted or that doesn't meet the security and cross-origin requirements. Upload the Swagger file to a blob container in an Azure storage account and turn on CORS on the storage account.
143+
144+
To create, set up, and store Swagger files in Azure Storage, follow these steps:
145+
146+
1. In the Azure portal, [create an Azure storage account](/azure/storage/common/storage-account-create).
147+
148+
1. Turn on CORS for the blob by following these steps:
149+
150+
1. On the storage account sidebar, under **Settings**, select **CORS**.
151+
152+
1. On the **Blob service** tab, enter the following values, and select **Save**.
153+
154+
| Parameter | Value |
155+
|-----------|-------|
156+
| **Allowed origins** | `*` |
157+
| **Allowed methods** | `GET`, `HEAD`, `PUT` |
158+
| **Allowed headers** | `*` |
159+
| **Exposed headers** | `*` |
160+
| **Max age** in seconds | `200` |
161+
162+
This example uses the Azure portal, but you can use a tool like [Azure Storage Explorer](https://storageexplorer.com/) to configure this setting. To automate configuration, see the [sample PowerShell script](https://github.com/logicappsio/EnableCORSAzureBlob/blob/master/EnableCORSAzureBlob.ps1).
163+
164+
1. [Create a blob container](/azure/storage/blobs/storage-quickstart-blobs-portal) and follow these steps:
165+
166+
1. On the container sidebar, select **Overview**.
167+
168+
1. On the **Overview** page, select **Change access level**.
169+
170+
1. From the **Public access level** list, select **Blob (anonymous read access for blobs only)**, and then select **OK**.
171+
172+
1. In the Azure portal or Azure Storage Explorer, [upload the Swagger file to the blob container](/azure/storage/blobs/storage-quickstart-blobs-portal#upload-a-block-blob).
173+
174+
1. To reference the file in the blob container, from Azure Storage Explorer, get the HTTPS URL that uses the following case-sensitive format:
175+
176+
`https://<storage-account-name>.blob.core.windows.net/<blob-container-name>/<complete-swagger-file-name>?<query-parameters>`
177+
178+
## Related content
155179

180+
- [Managed connectors for Azure Logic Apps](/connectors/connector-reference/connector-reference-logicapps-connectors)
181+
- [Built-in connectors for Azure Logic Apps](/azure/connectors/built-in)

0 commit comments

Comments
 (0)