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/logic-apps/logic-apps-http-endpoint.md
+47-41Lines changed: 47 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,27 +96,29 @@ If you're new to logic apps, see [What is Azure Logic Apps](../logic-apps/logic-
96
96
97
97
1. Save your logic app.
98
98
99
-
The **HTTP POST to this URL** box now shows the generated callback URL that other services can use to call and trigger your logic app. This URL includes a Shared Access Signature (SAS) key, which is used for authentication, in the query parameters, for example:
99
+
The **HTTP POST URL** box now shows the generated callback URL that other services can use to call and trigger your logic app. This URL includes query parameters that specify a Shared Access Signature (SAS) key, which is used for authentication.
100
100
101
101

102
102
103
-
You can also get the endpoint's URL from your logic app's **Overview** pane.
103
+
1. To copy the callback URL, you have these options:
104
104
105
-
1. On your logic app's menu, select **Overview**.
105
+
* To the right of the **HTTP POST URL** box, select **Copy Url** (copy files icon).
106
106
107
-
1. In the **Summary** section, select **See trigger history**.
107
+
* Make this POST call:
108
108
109
-

* Copy the callback URL from your logic app's **Overview** pane.
112
112
113
-

113
+
1. On your logic app's menu, select **Overview**.
114
114
115
-
Or you can get the URL by making this call:
115
+
1. In the **Summary** section, select **See trigger history**.
116
116
117
-
```http
118
-
POST https://management.azure.com/{logic-app-resource-ID}/triggers/{endpoint-trigger-name}/listCallbackURL?api-version=2016-06-01
119
-
```
117
+

118
+
119
+
1. Under **Callback url [POST]**, copy the URL:
120
+
121
+

120
122
121
123
<a name="set-method"></a>
122
124
@@ -140,7 +142,7 @@ When you want your endpoint URL to accept parameter values through the endpoint'
140
142
141
143
* [Accept values through GET parameters](#get-parameters) or URL parameters.
142
144
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.
145
+
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. In a subsequent action, you can get the parameter values as trigger outputs by using the `triggerOutputs()` function in an expression.
144
146
145
147
* [Accept values through a relative path](#relative-path) for the parameter in your Request trigger.
146
148
@@ -154,45 +156,53 @@ When you want your endpoint URL to accept parameter values through the endpoint'
154
156
155
157
For more information, see [Set expected HTTPS method](#set-method).
156
158
157
-
1. Get the endpoint's URL for the Request trigger by following these steps:
159
+
1. Under the Request trigger, add the action where you want to use the parameter value. For this example, add the **Response** action.
158
160
159
-
1. On your logic app's menu, select **Overview**.
161
+
1. Under the Request trigger, select **New step** > **Add an action**.
162
+
163
+
1. Under **Choose an action**, in the search box, enter `response` as your filter. From the actions list, select the **Response** action.
160
164
161
-
1. In the **Summary** section, select **See trigger history**.
165
+
1. To build the `triggerOutputs()` expression that retrieves the parameter value, follow these steps:
162
166
163
-

167
+
1. Click inside the Response action's **Body** property so that the dynamic content list appears, and select **Expression**.
164
168
165
-
1. Under **Callback url [GET]**, copy the endpoint's callback URL, for example:
169
+
1. In the **Expression** box, enter this expression, replacing `parameter-name` with your parameter name, and select **OK**.
166
170
167
-

171
+
`triggerOutputs()['queries']['parameter-name']`
168
172
169
-
1. Under the Request trigger, add the action where you want to use the parameter values. For this example, add the **Response** action.
173
+

170
174
171
-
1. Under the Request trigger, select **New step** > **Add an action**.
175
+
In the **Body** property, the expression resolves to the `triggerOutputs()` token.
172
176
173
-
1. Under **Choose an action**, in the search box, enter `response` as your filter.
1. From the actions list, select the **Response** action.
179
+
If you save the logic app, navigate away from the designer, and return to the designer, the token shows the parameter name that you specified, for example:
176
180
177
-
1. To build the expression, follow these steps:
181
+

178
182
179
-
1. Click inside the Response action's **Body** property so that the dynamic content list appears, and select **Expression**.
183
+
In code view, the **Body** property appears in the Response action's definition as follows:
180
184
181
-
1. In the **Expression** box, enter this expression, replacing `<parameter-name` with the parameter name that you want to use, and select **OK**.
For example, suppose that you want to pass a value for a parameter named `postalCode`. The **Body** property specifies the string, `Postal Code: ` with a trailing space, followed by the corresponding expression:
184
188
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.
189
+

186
190
187
-

191
+
1. To test your callable endpoint, copy the callback URL from the Request trigger, and paste the URL into another browser window. In the URL, add the parameter name and value following the question mark (`?`) to the URL in the following format, and press Enter.
188
192
189
-
For example, suppose that you want the Response action to return `Postal Code: {postalCode}`.
@@ -202,17 +212,15 @@ For example, suppose that you want the Response action to return `Postal Code: {
202
212
203
213

204
214
205
-
1. In the **Relative path** property, specify the relative path for the parameter in your JSON schema that you want your URL to accept, for example, `address/{postalCode}`.
215
+
1. In the **Relative path** property, specify the relative path for the parameter in your JSON schema that you want your URL to accept, for example, `/address/{postalCode}`.
206
216
207
217

208
218
209
219
1. To use the parameter, find and add a **Response** action to your logic app.
210
220
211
221
1. Under the Request trigger, select **New step** > **Add an action**.
212
222
213
-
1. Under **Choose an action**, in the search box, enter `response` as your filter.
214
-
215
-
1. From the actions list, select the **Response** action.
223
+
1. Under **Choose an action**, in the search box, enter `response` as your filter. From the actions list, select the **Response** action.
216
224
217
225
1. In the Response action's **Body** property, include the token that represents the parameter that you specified in your trigger's relative path.
218
226
@@ -228,13 +236,11 @@ For example, suppose that you want the Response action to return `Postal Code: {
228
236
229
237
1. Save your logic app.
230
238
231
-
Your endpoint's URL now includes the relative path, for example:
239
+
In the Request trigger, the callback URL is updated and now includes the relative path, for example:
1. To test your endpoint, copy and paste the updated URL into another browser window, but replace `{postalCode}` with `123456`, and press Enter.
243
+
1. To test your callable endpoint, copy the updated callback URL from the Request trigger, paste the URL into another browser window, replace `{postalCode}` in the URL with `123456`, and press Enter.
238
244
239
245
Your browser shows this text: `Postal Code: 123456`
0 commit comments