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/connectors/connectors-native-reqres.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,25 +3,27 @@ title: Receive and respond to calls by using HTTPS
3
3
description: Handle inbound HTTPS requests from external services by using Azure Logic Apps
4
4
services: logic-apps
5
5
ms.suite: integration
6
-
ms.reviewers: klam, logicappspm
6
+
ms.reviewers: jonfan, logicappspm
7
7
ms.topic: conceptual
8
-
ms.date: 03/12/2020
8
+
ms.date: 05/06/2020
9
9
tags: connectors
10
10
---
11
11
12
12
# Receive and respond to inbound HTTPS requests in Azure Logic Apps
13
13
14
-
With [Azure Logic Apps](../logic-apps/logic-apps-overview.md) and the built-in Request trigger or Response action, you can create automated tasks and workflows that receive and respond to incoming HTTPS requests. For example, you can have your logic app:
14
+
With [Azure Logic Apps](../logic-apps/logic-apps-overview.md) and the built-in Request trigger and Response action, you can create automated tasks and workflows that receive and respond to incoming HTTPS requests. For example, you can have your logic app:
15
15
16
16
* Receive and respond to an HTTPS request for data in an on-premises database.
17
17
* Trigger a workflow when an external webhook event happens.
18
18
* Receive and respond to an HTTPS call from another logic app.
19
19
20
20
> [!NOTE]
21
-
> The Request trigger supports *only* Transport Layer Security (TLS) 1.2 for incoming calls. Outgoing calls
22
-
> continue to support TLS 1.0, 1.1, and 1.2. For more information, see [Solving the TLS 1.0 problem](https://docs.microsoft.com/security/solving-tls1-problem).
21
+
> The Request trigger supports *only* Transport Layer Security (TLS) 1.2 for incoming calls.
22
+
> Outgoing calls continue to support TLS 1.0, 1.1, and 1.2. For more information, see
23
+
> [Solving the TLS 1.0 problem](https://docs.microsoft.com/security/solving-tls1-problem).
23
24
>
24
-
> If you see TLS handshake errors, make sure that you use TLS 1.2. For incoming calls, here are the supported cipher suites:
25
+
> If you see TLS handshake errors, make sure that you use TLS 1.2.
26
+
> For incoming calls, here are the supported cipher suites:
25
27
>
26
28
> * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
27
29
> * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
@@ -42,11 +44,11 @@ With [Azure Logic Apps](../logic-apps/logic-apps-overview.md) and the built-in R
42
44
43
45
## Add Request trigger
44
46
45
-
This built-in trigger creates a manually callable HTTPS endpoint that can receive *only* incoming HTTPS requests. When this event happens, the trigger fires and runs the logic app. For more information about the trigger's underlying JSON definition and how to call this trigger, see the [Request trigger type](../logic-apps/logic-apps-workflow-actions-triggers.md#request-trigger) and [Call, trigger, or nest workflows with HTTP endpoints in Azure Logic Apps](../logic-apps/logic-apps-http-endpoint.md).
47
+
This built-in trigger creates a manually callable HTTPS endpoint that can receive *only* incoming HTTPS requests. When this event happens, the trigger fires and runs the logic app. For more information about the trigger's underlying JSON definition and how to call this trigger, see the [Request trigger type](../logic-apps/logic-apps-workflow-actions-triggers.md#request-trigger) and [Call, trigger, or nest workflows with HTTPS endpoints in Azure Logic Apps](../logic-apps/logic-apps-http-endpoint.md).
46
48
47
49
1. Sign in to the [Azure portal](https://portal.azure.com). Create a blank logic app.
48
50
49
-
1. After Logic App Designer opens, in the search box, enter "http request" as your filter. From the triggers list, select the **When an HTTP request is received** trigger, which is the first step in your logic app workflow.
51
+
1. After Logic App Designer opens, in the search box, enter `http request` as your filter. From the triggers list, select the **When an HTTP request is received** trigger, which is the first step in your logic app workflow.
Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-http-endpoint.md
+87-27Lines changed: 87 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,25 @@
1
1
---
2
2
title: Call, trigger, or nest logic apps
3
-
description: Set up HTTP endpoints to call, trigger, or nest logic app workflows in Azure Logic Apps
3
+
description: Set up HTTPS endpoints to call, trigger, or nest logic app workflows in Azure Logic Apps
4
4
services: logic-apps
5
5
ms.workload: integration
6
-
ms.reviewer: klam, jehollan, logicappspm
6
+
ms.reviewer: jonfan, logicappspm
7
7
ms.topic: article
8
-
ms.date: 11/04/2019
8
+
ms.date: 05/06/2020
9
9
---
10
10
11
-
# Call, trigger, or nest logic apps by using HTTP endpoints in Azure Logic Apps
11
+
# Call, trigger, or nest logic apps by using HTTPS endpoints in Azure Logic Apps
12
12
13
-
To make your logic app callable through a URL so that your logic app can receive incoming requests from other services, you can natively expose a synchronous HTTP endpoint as a trigger on that logic app. When you set up this capability, you can also nest your logic app inside other logic apps, which lets you create a pattern of callable endpoints.
13
+
To make your logic app callable through a URL so that your logic app can receive incoming requests from other services, you can natively expose a synchronous HTTPS endpoint as a trigger on that logic app. When you set up this capability, you can also nest your logic app inside other logic apps, which lets you create a pattern of callable endpoints.
14
14
15
-
To set up an HTTP endpoint, you can use any of these trigger types, which enable logic apps to receive incoming requests:
15
+
To set up a callable endpoint, you can use any of these trigger types, which enable logic apps to receive incoming requests:
* Managed connector triggers that have the [ApiConnectionWebhook type](../logic-apps/logic-apps-workflow-actions-triggers.md#apiconnectionwebhook-trigger) and can receive incoming HTTP requests
19
+
* Managed connector triggers that have the [ApiConnectionWebhook type](../logic-apps/logic-apps-workflow-actions-triggers.md#apiconnectionwebhook-trigger) and can receive incoming HTTPS requests
20
20
21
21
> [!NOTE]
22
-
> These examples use the Request trigger, but you can use any HTTP request-based trigger that's
22
+
> These examples use the Request trigger, but you can use any HTTPS request-based trigger that's
23
23
> in the previous list. All principles identically apply to these other trigger types.
24
24
25
25
If you're new to logic apps, see [What is Azure Logic Apps](../logic-apps/logic-apps-overview.md) and [Quickstart: Create your first logic app](../logic-apps/quickstart-create-first-logic-app-workflow.md).
@@ -28,13 +28,13 @@ If you're new to logic apps, see [What is Azure Logic Apps](../logic-apps/logic-
28
28
29
29
* An Azure subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free/).
30
30
31
-
* The logic app where you want to set up the HTTP endpoint as the trigger. You can start with either a blank logic app or an existing logic app where you want to replace the current trigger. This example starts with a blank logic app.
31
+
* The logic app where you want to use the trigger to create the callable endpoint . You can start with either a blank logic app or an existing logic app where you want to replace the current trigger. This example starts with a blank logic app.
32
32
33
33
## Create a callable endpoint
34
34
35
35
1. Sign in to the [Azure portal](https://portal.azure.com). Create and open a blank logic app in the Logic App Designer.
36
36
37
-
This example uses the Request trigger, but you can use any trigger that can receive incoming HTTP requests. All principles identically apply to these triggers. For more information about the Request trigger, see [Receive and respond to incoming HTTPS calls by using Azure Logic Apps](../connectors/connectors-native-reqres.md).
37
+
This example uses the Request trigger, but you can use any trigger that can receive incoming HTTPS requests. All principles identically apply to these triggers. For more information about the Request trigger, see [Receive and respond to inbound HTTPS calls by using Azure Logic Apps](../connectors/connectors-native-reqres.md).
38
38
39
39
1. Under the search box, select **Built-in**. In the search box, enter `request` as your filter. From the triggers list, select **When a HTTP request is received**.
40
40
@@ -100,17 +100,17 @@ If you're new to logic apps, see [What is Azure Logic Apps](../logic-apps/logic-
100
100
101
101

102
102
103
-
You can also get the HTTP endpoint URL from your logic app's **Overview** pane.
103
+
You can also get the endpoint's URL from your logic app's **Overview** pane.
104
104
105
105
1. On your logic app's menu, select **Overview**.
106
106
107
107
1. In the **Summary** section, select **See trigger history**.
108
108
109
-

109
+

110
110
111
111
1. Under **Callback url [POST]**, copy the URL:
112
112
113
-

113
+

114
114
115
115
Or you can get the URL by making this call:
116
116
@@ -120,23 +120,83 @@ If you're new to logic apps, see [What is Azure Logic Apps](../logic-apps/logic-
120
120
121
121
<a name="set-method"></a>
122
122
123
-
## Set expected HTTP method
123
+
## Set expected request method
124
124
125
-
By default, the Request trigger expects an HTTP POST request. However, you can specify a different method to expect, but only one method.
125
+
By default, the Request trigger expects a POST request. You can specify a different method to expect, but only a single method.
126
126
127
127
1. In the Request trigger, open the **Add new parameter** list, and select **Method**, which adds this property to the trigger.
128
128
129
129

130
130
131
131
1. From the **Method** list, select another method that the trigger expects instead. Or, you can specify a custom method.
132
132
133
-
For example, select the **GET** method so that you can test your HTTP endpoint's URL later.
133
+
For example, select the **GET** method so that you can test your endpoint's URL later.
134
134
135
-

135
+

136
136
137
137
## Accept parameters in endpoint URL
138
138
139
-
When you want your endpoint URL to accept parameters, specify the relative path in your trigger. You also need to explicitly [set the method](#set-method) that your HTTP request expects.
139
+
When you want your endpoint URL to accept parameter values through the endpoint's URL, you have these options:
140
+
141
+
* [Accept values through GET parameters](#get-parameters) or URL parameters.
142
+
143
+
These values are passed as name-value pairs when sending the request to the endpoint's URL. For this option, you need to use the GET method in your Request trigger. You can then use the `triggerOutputs()` function in a subsequent action to get the parameter values as trigger outputs.
144
+
145
+
* [Accept values through a relative path](#relative-path) for the parameter in your Request trigger.
146
+
147
+
You need to explicitly [set the method](#set-method) that your HTTPS request expects.
148
+
149
+
<a name="get-parameters"></a>
150
+
151
+
### Accept values through GET parameters
152
+
153
+
1. In the Request trigger, open the **Add new parameter list**, add the **Method** property to the trigger, and select the **GET** method.
154
+
155
+
For more information, see [Set expected HTTPS method](#set-method).
156
+
157
+
1. Get the endpoint's URL for the Request trigger by following these steps:
158
+
159
+
1. On your logic app's menu, select **Overview**.
160
+
161
+
1. In the **Summary** section, select **See trigger history**.
162
+
163
+

164
+
165
+
1. Under **Callback url [GET]**, copy the endpoint's callback URL, for example:
166
+
167
+

168
+
169
+
1. Under the Request trigger, add the action where you want to use the parameter values. For this example, add the **Response** action.
170
+
171
+
1. Under the Request trigger, select **New step** > **Add an action**.
172
+
173
+
1. Under **Choose an action**, in the search box, enter `response` as your filter.
174
+
175
+
1. From the actions list, select the **Response** action.
176
+
177
+
1. To build the expression, follow these steps:
178
+
179
+
1. Click inside the Response action's **Body** property so that the dynamic content list appears, and select **Expression**.
180
+
181
+
1. In the **Expression** box, enter this expression, replacing `<parameter-name` with the parameter name that you want to use, and select **OK**.
182
+
183
+
`triggerOutputs()['queries']['<parameter-name>']`
184
+
185
+
For example, suppose that you want to pass a value for a parameter named `postalCode`. This example has the Response action return a string, `Postal Code: `, followed by the parameter value.
186
+
187
+

188
+
189
+
For example, suppose that you want the Response action to return `Postal Code: {postalCode}`.
190
+
191
+
In the **Body** property, enter `Postal Code: ` with a trailing space. From the dynamic content list that appears, select the **postalCode** token.
192
+
193
+
1. In the Response action's **Body** property,
194
+
195
+
1. To test the endpoint, edit the endpoint URL that you copied
196
+
197
+
<a name="relative-path"></a>
198
+
199
+
### Accept values through a relative path
140
200
141
201
1. In the Request trigger, open the **Add new parameter** list, and select **Relative path**, which adds this property to the trigger.
142
202
@@ -168,19 +228,19 @@ When you want your endpoint URL to accept parameters, specify the relative path
168
228
169
229
1. Save your logic app.
170
230
171
-
Your HTTP endpoint URL now includes the relative path, for example:
231
+
Your endpoint's URL now includes the relative path, for example:
1. To test your HTTP endpoint, copy and paste the updated URL into another browser window, but replace `{postalCode}` with `123456`, and press Enter.
237
+
1. To test your endpoint, copy and paste the updated URL into another browser window, but replace `{postalCode}` with `123456`, and press Enter.
178
238
179
239
Your browser shows this text: `Postal Code: 123456`
180
240
181
-
## Call logic app through HTTP endpoint
241
+
## Call logic app through endpoint URL
182
242
183
-
After you create the HTTP endpoint, you can trigger the logic app by sending an HTTP `POST` request to the endpoint's full URL. Logic apps have built-in support for direct-access endpoints.
243
+
After you create the endpoint, you can trigger the logic app by sending an HTTPS `POST` request to the endpoint's full URL. Logic apps have built-in support for direct-access endpoints.
184
244
185
245
<a name="generated-tokens"></a>
186
246
@@ -257,7 +317,7 @@ To access specifically the `body` property, you can use the [`@triggerBody()` ex
257
317
258
318
## Respond to requests
259
319
260
-
Sometimes you want to respond to certain requests that trigger your logic app by returning content to the caller. To construct the status code, header, and body for your response, use the Response action. This action can appear anywhere in your logic app, not just at the end of your workflow. If your logic app doesn't include a Response action, the HTTP endpoint responds *immediately* with the **202 Accepted** status.
320
+
Sometimes you want to respond to certain requests that trigger your logic app by returning content to the caller. To construct the status code, header, and body for your response, use the Response action. This action can appear anywhere in your logic app, not just at the end of your workflow. If your logic app doesn't include a Response action, the endpoint responds *immediately* with the **202 Accepted** status.
261
321
262
322
For the original caller to successfully get the response, all the required steps for the response must finish within the [request timeout limit](./logic-apps-limits-and-config.md) unless the triggered logic app is called as a nested logic app. If no response is returned within this limit, the incoming request times out and receives the **408 Client timeout** response.
263
323
@@ -267,13 +327,13 @@ For nested logic apps, the parent logic app continues to wait for a response unt
267
327
268
328
In the response body, you can include multiple headers and any type of content. For example, this response's header specifies that the response's content type is `application/json` and that the body contains values for the `town` and `postalCode` properties, based on the JSON schema described earlier in this topic for the Request trigger.
269
329
270
-

330
+

|**Status Code**|`statusCode`| The HTTP status code to use in the response for the incoming request. This code can be any valid status code that starts with 2xx, 4xx, or 5xx. However, 3xx status codes are not permitted. |
336
+
|**Status Code**|`statusCode`| The HTTPS status code to use in the response for the incoming request. This code can be any valid status code that starts with 2xx, 4xx, or 5xx. However, 3xx status codes are not permitted. |
277
337
|**Headers**|`headers`| One or more headers to include in the response |
278
338
|**Body**|`body`| A body object that can be a string, a JSON object, or even binary content referenced from a previous step |
279
339
||||
@@ -310,9 +370,9 @@ To view the JSON definition for the Response action and your logic app's complet
310
370
> * The shared access key appears in the URL.
311
371
> * You can't manage security content policies due to shared domains across Azure Logic Apps customers.
312
372
313
-
#### Q: Can I configure HTTP endpoints further?
373
+
#### Q: Can I configure callable endpoints further?
314
374
315
-
**A**: Yes, HTTP endpoints support more advanced configuration through [Azure API Management](../api-management/api-management-key-concepts.md). This service also offers the capability for you to consistently manage all your APIs, including logic apps, set up custom domain names, use more authentication methods, and more, for example:
375
+
**A**: Yes, HTTPS endpoints support more advanced configuration through [Azure API Management](../api-management/api-management-key-concepts.md). This service also offers the capability for you to consistently manage all your APIs, including logic apps, set up custom domain names, use more authentication methods, and more, for example:
316
376
317
377
*[Change the request method](../api-management/api-management-advanced-policies.md#SetRequestMethod)
318
378
*[Change the URL segments of the request](../api-management/api-management-transformation-policies.md#RewriteURL)
0 commit comments