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
+39-26Lines changed: 39 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Respond to HTTP or HTTPS requests - Azure Logic Apps
3
-
description: Respond to events in real time over HTTP or HTTPS by using Azure Logic Apps
2
+
title: Respond to HTTP requests - Azure Logic Apps
3
+
description: Respond to events in real time over HTTP by using Azure Logic Apps
4
4
services: logic-apps
5
5
ms.service: logic-apps
6
6
ms.suite: integration
@@ -14,9 +14,9 @@ ms.date: 09/06/2019
14
14
tags: connectors
15
15
---
16
16
17
-
# Respond to HTTP or HTTPS requests by using Azure Logic Apps
17
+
# Respond to HTTP requests by using Azure Logic Apps
18
18
19
-
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 react and respond in real time to events that are sent over HTTP or HTTPS. For example, you can have your logic app:
19
+
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 in real time to HTTP requests. For example, you can have your logic app:
20
20
21
21
* Respond to an HTTP request for data in an on-premises database.
22
22
* Trigger a workflow when an external webhook event happens.
@@ -30,17 +30,27 @@ With [Azure Logic Apps](../logic-apps/logic-apps-overview.md) and the built-in R
30
30
31
31
<aname="add-request"></a>
32
32
33
-
## Add the Request trigger
33
+
## Add a Request trigger
34
34
35
-
This built-in trigger creates an endpoint that waits for and receives an incoming request over HTTP or HTTPS. When this event happens, the trigger fires and runs the logic app.
35
+
This built-in trigger creates a manually callable endpoint that can receive an incoming HTTP request. 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)
36
36
37
37
1. Sign in to the [Azure portal](https://portal.azure.com). Create a blank logic app.
38
38
39
39
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.
1. For the **Request Body JSON Schema** box, you can optionally enter a JSON schema that describes the HTTP request body that's expected in the incoming request, for example:
@@ -131,24 +141,27 @@ This built-in trigger creates an endpoint that waits for and receives an incomin
131
141
}
132
142
```
133
143
134
-
1. To specify additional properties, such as the expected method used for the request or a relative path, open the **Add new parameter** list, and select the parameters that you want to add.
144
+
1. To specify additional properties, open the **Add new parameter** list, and select the parameters that you want to add.
145
+
146
+
| Property name | JSON property name | Required | Description |
1. Now, add another action as the next step in your workflow. Under the trigger, select **Next step** so that you can find the action that you want to add.
145
161
146
-
For example, you can respond to the request by [adding a Response action](#add-response), which is described later in this topic.
162
+
For example, you can respond to the request by [adding a Response action](#add-response), which you can use to return a customized response and is described later in this topic.
147
163
148
-
> [!NOTE]
149
-
> If you don't include and define a Response action in your logic app workflow,
150
-
> your logic app immediately returns a `202 ACCEPTED` response to the caller.
151
-
> You can use the Response action to customize a response.
164
+
Your logic app keeps the incoming request open only for one minute. Assuming that your logic app workflow includes a Response action, if the logic app doesn't return a response after this time passes, your logic app returns a `504 GATEWAY TIMEOUT` to the caller. Otherwise, if your logic app doesn't include a Response action, your logic app immediately returns a `202 ACCEPTED` response to the caller.
152
165
153
166
1. When you're done, save your logic app. On the designer toolbar, select **Save**.
154
167
@@ -162,8 +175,8 @@ This built-in trigger creates an endpoint that waits for and receives an incomin
162
175
163
176
Here's more information about the outputs from the Request trigger:
164
177
165
-
| Property name | Data type | Description |
166
-
|---------------|-----------|-------------|
178
+
| JSON property name | Data type | Description |
179
+
|--------------------|-----------|-------------|
167
180
| `headers` | Object | A JSON object that describes the headers from the request |
168
181
| `body` | Object | A JSON object that describes the body content from the request |
169
182
||||
@@ -172,9 +185,9 @@ Here's more information about the outputs from the Request trigger:
172
185
173
186
## Add a Response action
174
187
175
-
You can use the Response action to customize a response but only in a logic app workflow that's triggered by an HTTP request. You can add the Response action at any point in your workflow.
188
+
You can use the Response action to respond with a payload (data) to an incoming HTTP request but only in a logic app that's triggered by an HTTP request. You can add the Response action at any point in your workflow. For more information about the underlying JSON definition for this trigger, see the [Response action type](../logic-apps/logic-apps-workflow-actions-triggers.md#response-action).
176
189
177
-
Your logic app keeps the incoming request open only for one minute. Assuming that your logic app workflow includes a Response action, if the logic app doesn't return a response after this time passes, your logic app returns a `504 GATEWAY TIMEOUT` to the caller. However, if your logic app doesn't include a Response action, your logic app immediately returns a `202 ACCEPTED` response to the caller.
190
+
Your logic app keeps the incoming request open only for one minute. Assuming that your logic app workflow includes a Response action, if the logic app doesn't return a response after this time passes, your logic app returns a `504 GATEWAY TIMEOUT` to the caller. Otherwise, if your logic app doesn't include a Response action, your logic app immediately returns a `202 ACCEPTED` response to the caller.
178
191
179
192
1. In the Logic App Designer, under the step where you want to add a Response action, select **New step**.
180
193
@@ -194,7 +207,7 @@ Your logic app keeps the incoming request open only for one minute. Assuming tha
194
207
195
208
In some fields, clicking inside their boxes opens the dynamic content list. You can then select tokens that represent available outputs from previous steps in the workflow. Properties from the schema specified in the earlier example now appear in the dynamic content list.
196
209
197
-
For example, in the **Headers** field, include `Content-Type` as the key name and set the key value to `application/json`, as mentioned earlier in this topic. For the **Body** field, you can select the trigger body from the dynamic content list.
210
+
For example, for the **Headers** box, include `Content-Type` as the key name, and set the key value to `application/json` as mentioned earlier in this topic. For the **Body** box, you can select the trigger body output from the dynamic content list.
| **Status Code** | `statusCode` | Yes | The HTTP status code to return in the response |
223
+
| **Headers** | `headers` | No | A JSON object that describes one or more headers to include in the response |
224
+
| **Body** | `body` | No | The response body |
212
225
|||||
213
226
214
-
1. To specify additional properties, such as a JSON schema for the response, open the **Add new parameter** list, and select the parameters that you want to add.
227
+
1. To specify additional properties, such as a JSON schema for the response body, open the **Add new parameter** list, and select the parameters that you want to add.
215
228
216
229
1. When you're done, save your logic app. On the designer toolbar, select **Save**.
0 commit comments