Skip to content

Commit 9db2c2a

Browse files
authored
Merge pull request #88135 from ecfan/request
Clarity edits
2 parents 56cb27c + d4fd2a3 commit 9db2c2a

File tree

3 files changed

+39
-26
lines changed

3 files changed

+39
-26
lines changed

articles/connectors/connectors-native-reqres.md

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
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
44
services: logic-apps
55
ms.service: logic-apps
66
ms.suite: integration
@@ -14,9 +14,9 @@ ms.date: 09/06/2019
1414
tags: connectors
1515
---
1616

17-
# Respond to HTTP or HTTPS requests by using Azure Logic Apps
17+
# Respond to HTTP requests by using Azure Logic Apps
1818

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

2121
* Respond to an HTTP request for data in an on-premises database.
2222
* 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
3030

3131
<a name="add-request"></a>
3232

33-
## Add the Request trigger
33+
## Add a Request trigger
3434

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)
3636

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

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

4141
![Select HTTP request trigger](./media/connectors-native-reqres/select-request-trigger.png)
4242

43-
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:
43+
The Request trigger shows these properties:
44+
45+
![Request trigger](./media/connectors-native-reqres/request-trigger.png)
46+
47+
| Property name | JSON property name | Required | Description |
48+
|---------------|--------------------|----------|-------------|
49+
| **HTTP POST URL** | {none} | Yes | The endpoint URL that's generated after you save the logic app and is used for calling your logic app |
50+
| **Request Body JSON Schema** | `schema` | No | The JSON schema that describes the properties and values in the incoming HTTP request body |
51+
|||||
52+
53+
1. In the **Request Body JSON Schema** box, optionally enter a JSON schema that describes the HTTP request body in the incoming request, for example:
4454

4555
![Example JSON schema](./media/connectors-native-reqres/provide-json-schema.png)
4656

@@ -131,24 +141,27 @@ This built-in trigger creates an endpoint that waits for and receives an incomin
131141
}
132142
```
133143

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 |
147+
|---------------|--------------------|----------|-------------|
148+
| **Method** | `method` | No | The method that the incoming request must use to call the logic app |
149+
| **Relative path** | `relativePath` | No | The relative path for the parameter that the logic app's endpoint URL can accept |
150+
|||||
135151

136-
This example adds the **Method** parameter:
152+
This example adds the **Method** property:
137153

138154
![Add Method parameter](./media/connectors-native-reqres/add-parameters.png)
139155

140-
Now the **Method** parameter appears in the trigger so that you can select a method from the list.
156+
The **Method** property appears in the trigger so that you can select a method from the list.
141157

142158
![Select method](./media/connectors-native-reqres/select-method.png)
143159

144160
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.
145161

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

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

153166
1. When you're done, save your logic app. On the designer toolbar, select **Save**.
154167

@@ -162,8 +175,8 @@ This built-in trigger creates an endpoint that waits for and receives an incomin
162175

163176
Here's more information about the outputs from the Request trigger:
164177

165-
| Property name | Data type | Description |
166-
|---------------|-----------|-------------|
178+
| JSON property name | Data type | Description |
179+
|--------------------|-----------|-------------|
167180
| `headers` | Object | A JSON object that describes the headers from the request |
168181
| `body` | Object | A JSON object that describes the body content from the request |
169182
||||
@@ -172,9 +185,9 @@ Here's more information about the outputs from the Request trigger:
172185

173186
## Add a Response action
174187

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

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

179192
1. In the Logic App Designer, under the step where you want to add a Response action, select **New step**.
180193

@@ -194,7 +207,7 @@ Your logic app keeps the incoming request open only for one minute. Assuming tha
194207

195208
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.
196209

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

199212
![Response action details](./media/connectors-native-reqres/response-details.png)
200213

@@ -204,14 +217,14 @@ Your logic app keeps the incoming request open only for one minute. Assuming tha
204217

205218
Here is more information about the properties that you can set in the Response action.
206219

207-
| Display name | Property name | Required | Description |
208-
|--------------|---------------|----------|-------------|
209-
| Status Code | `statusCode` | Yes | The HTTP status code to return |
210-
| Headers | `headers` | No | A JSON object that describes any response headers to include. |
211-
| Body | `body` | No | The response body |
220+
| Property name | JSON property name | Required | Description |
221+
|---------------|--------------------|----------|-------------|
222+
| **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 |
212225
|||||
213226

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

216229
1. When you're done, save your logic app. On the designer toolbar, select **Save**.
217230

-37.1 KB
Loading
6.16 KB
Loading

0 commit comments

Comments
 (0)