Skip to content

Commit f85c398

Browse files
committed
Add content draft and art
1 parent 95ba75b commit f85c398

File tree

5 files changed

+98
-36
lines changed

5 files changed

+98
-36
lines changed

articles/connectors/connectors-native-reqres.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,27 @@ title: Receive and respond to calls by using HTTPS
33
description: Handle inbound HTTPS requests from external services by using Azure Logic Apps
44
services: logic-apps
55
ms.suite: integration
6-
ms.reviewers: klam, logicappspm
6+
ms.reviewers: jonfan, logicappspm
77
ms.topic: conceptual
8-
ms.date: 03/12/2020
8+
ms.date: 05/06/2020
99
tags: connectors
1010
---
1111

1212
# Receive and respond to inbound HTTPS requests in Azure Logic Apps
1313

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:
1515

1616
* Receive and respond to an HTTPS request for data in an on-premises database.
1717
* Trigger a workflow when an external webhook event happens.
1818
* Receive and respond to an HTTPS call from another logic app.
1919

2020
> [!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).
2324
>
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:
2527
>
2628
> * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
2729
> * 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
4244

4345
## Add Request trigger
4446

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).
4648

4749
1. Sign in to the [Azure portal](https://portal.azure.com). Create a blank logic app.
4850

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.
5052

5153
![Select Request trigger](./media/connectors-native-reqres/select-request-trigger.png)
5254

@@ -179,7 +181,7 @@ This built-in trigger creates a manually callable HTTPS endpoint that can receiv
179181

180182
![URL to use triggering your logic app](./media/connectors-native-reqres/generated-url.png)
181183

182-
1. To trigger your logic app, send an HTTP POST to the generated URL. For example, you can use a tool such as [Postman](https://www.getpostman.com/).
184+
1. To trigger your logic app, send an HTTPS POST to the generated URL. For example, you can use a tool such as [Postman](https://www.getpostman.com/).
183185

184186
### Trigger outputs
185187

articles/logic-apps/logic-apps-http-endpoint.md

Lines changed: 87 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
22
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
44
services: logic-apps
55
ms.workload: integration
6-
ms.reviewer: klam, jehollan, logicappspm
6+
ms.reviewer: jonfan, logicappspm
77
ms.topic: article
8-
ms.date: 11/04/2019
8+
ms.date: 05/06/2020
99
---
1010

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
1212

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.
1414

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:
1616

1717
* [Request](../connectors/connectors-native-reqres.md)
1818
* [HTTP Webhook](../connectors/connectors-native-webhook.md)
19-
* 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
2020

2121
> [!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
2323
> in the previous list. All principles identically apply to these other trigger types.
2424
2525
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-
2828

2929
* An Azure subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free/).
3030

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.
3232

3333
## Create a callable endpoint
3434

3535
1. Sign in to the [Azure portal](https://portal.azure.com). Create and open a blank logic app in the Logic App Designer.
3636

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).
3838

3939
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**.
4040

@@ -100,17 +100,17 @@ If you're new to logic apps, see [What is Azure Logic Apps](../logic-apps/logic-
100100

101101
![Generated callback URL for endpoint](./media/logic-apps-http-endpoint/generated-endpoint-url.png)
102102

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.
104104

105105
1. On your logic app's menu, select **Overview**.
106106

107107
1. In the **Summary** section, select **See trigger history**.
108108

109-
![Get HTTP endpoint URL from Azure portal](./media/logic-apps-http-endpoint/find-manual-trigger-url.png)
109+
![Get endpoint URL from Azure portal](./media/logic-apps-http-endpoint/find-manual-trigger-url.png)
110110

111111
1. Under **Callback url [POST]**, copy the URL:
112112

113-
![Copy HTTP endpoint URL from Azure portal](./media/logic-apps-http-endpoint/copy-manual-trigger-callback-url.png)
113+
![Copy endpoint URL from Azure portal](./media/logic-apps-http-endpoint/copy-manual-trigger-callback-url-post.png)
114114

115115
Or you can get the URL by making this call:
116116

@@ -120,23 +120,83 @@ If you're new to logic apps, see [What is Azure Logic Apps](../logic-apps/logic-
120120

121121
<a name="set-method"></a>
122122

123-
## Set expected HTTP method
123+
## Set expected request method
124124

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.
126126

127127
1. In the Request trigger, open the **Add new parameter** list, and select **Method**, which adds this property to the trigger.
128128

129129
![Add "Method" property to trigger](./media/logic-apps-http-endpoint/select-add-new-parameter-for-method.png)
130130

131131
1. From the **Method** list, select another method that the trigger expects instead. Or, you can specify a custom method.
132132

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.
134134

135-
![Select HTTP method to use for trigger](./media/logic-apps-http-endpoint/select-method-request-trigger.png)
135+
![Select HTTPS method to use for trigger](./media/logic-apps-http-endpoint/select-method-request-trigger.png)
136136

137137
## Accept parameters in endpoint URL
138138

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+
![Get endpoint URL from Azure portal](./media/logic-apps-http-endpoint/find-manual-trigger-url.png)
164+
165+
1. Under **Callback url [GET]**, copy the endpoint's callback URL, for example:
166+
167+
![Add "Relative path" property to trigger](./media/logic-apps-http-endpoint/copy-manual-trigger-callback-url-get.png)
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+
![Add "Relative path" property to trigger](./media/logic-apps-http-endpoint/trigger-outputs-expression.png)
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
140200

141201
1. In the Request trigger, open the **Add new parameter** list, and select **Relative path**, which adds this property to the trigger.
142202

@@ -168,19 +228,19 @@ When you want your endpoint URL to accept parameters, specify the relative path
168228

169229
1. Save your logic app.
170230

171-
Your HTTP endpoint URL now includes the relative path, for example:
231+
Your endpoint's URL now includes the relative path, for example:
172232

173233
```http
174234
https://prod-25.westus.logic.azure.com/workflows/{logic-app-resource-ID}/triggers/manual/paths/invoke/address/{postalCode}?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig={shared-access-signature}
175235
```
176236

177-
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.
178238

179239
Your browser shows this text: `Postal Code: 123456`
180240

181-
## Call logic app through HTTP endpoint
241+
## Call logic app through endpoint URL
182242

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.
184244

185245
<a name="generated-tokens"></a>
186246

@@ -257,7 +317,7 @@ To access specifically the `body` property, you can use the [`@triggerBody()` ex
257317

258318
## Respond to requests
259319

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.
261321

262322
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.
263323

@@ -267,13 +327,13 @@ For nested logic apps, the parent logic app continues to wait for a response unt
267327

268328
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.
269329

270-
![Provide response content for HTTP Response action](./media/logic-apps-http-endpoint/content-for-response-action.png)
330+
![Provide response content for HTTPS Response action](./media/logic-apps-http-endpoint/content-for-response-action.png)
271331

272332
Responses have these properties:
273333

274334
| Property (Display) | Property (JSON) | Description |
275335
|--------------------|-----------------|-------------|
276-
| **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. |
277337
| **Headers** | `headers` | One or more headers to include in the response |
278338
| **Body** | `body` | A body object that can be a string, a JSON object, or even binary content referenced from a previous step |
279339
||||
@@ -310,9 +370,9 @@ To view the JSON definition for the Response action and your logic app's complet
310370
> * The shared access key appears in the URL.
311371
> * You can't manage security content policies due to shared domains across Azure Logic Apps customers.
312372
313-
#### Q: Can I configure HTTP endpoints further?
373+
#### Q: Can I configure callable endpoints further?
314374

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:
316376

317377
* [Change the request method](../api-management/api-management-advanced-policies.md#SetRequestMethod)
318378
* [Change the URL segments of the request](../api-management/api-management-transformation-policies.md#RewriteURL)
18.3 KB
Loading
18.5 KB
Loading
45.9 KB
Loading

0 commit comments

Comments
 (0)