Skip to content

Commit d1f6d5f

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

9 files changed

+47
-41
lines changed

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

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -96,27 +96,29 @@ If you're new to logic apps, see [What is Azure Logic Apps](../logic-apps/logic-
9696

9797
1. Save your logic app.
9898

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

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

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

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

107-
1. In the **Summary** section, select **See trigger history**.
107+
* Make this POST call:
108108

109-
![Get endpoint URL from Azure portal](./media/logic-apps-http-endpoint/find-manual-trigger-url.png)
109+
`POST https://management.azure.com/{logic-app-resource-ID}/triggers/{endpoint-trigger-name}/listCallbackURL?api-version=2016-06-01`
110110

111-
1. Under **Callback url [POST]**, copy the URL:
111+
* Copy the callback URL from your logic app's **Overview** pane.
112112

113-
![Copy endpoint URL from Azure portal](./media/logic-apps-http-endpoint/copy-manual-trigger-callback-url-post.png)
113+
1. On your logic app's menu, select **Overview**.
114114

115-
Or you can get the URL by making this call:
115+
1. In the **Summary** section, select **See trigger history**.
116116

117-
```http
118-
POST https://management.azure.com/{logic-app-resource-ID}/triggers/{endpoint-trigger-name}/listCallbackURL?api-version=2016-06-01
119-
```
117+
![Get endpoint URL from Azure portal](./media/logic-apps-http-endpoint/find-manual-trigger-url.png)
118+
119+
1. Under **Callback url [POST]**, copy the URL:
120+
121+
![Copy endpoint URL from Azure portal](./media/logic-apps-http-endpoint/copy-manual-trigger-callback-url-post.png)
120122

121123
<a name="set-method"></a>
122124

@@ -140,7 +142,7 @@ When you want your endpoint URL to accept parameter values through the endpoint'
140142

141143
* [Accept values through GET parameters](#get-parameters) or URL parameters.
142144

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

145147
* [Accept values through a relative path](#relative-path) for the parameter in your Request trigger.
146148

@@ -154,45 +156,53 @@ When you want your endpoint URL to accept parameter values through the endpoint'
154156

155157
For more information, see [Set expected HTTPS method](#set-method).
156158

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

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

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

163-
![Get endpoint URL from Azure portal](./media/logic-apps-http-endpoint/find-manual-trigger-url.png)
167+
1. Click inside the Response action's **Body** property so that the dynamic content list appears, and select **Expression**.
164168

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**.
166170

167-
![Add "Relative path" property to trigger](./media/logic-apps-http-endpoint/copy-manual-trigger-callback-url-get.png)
171+
`triggerOutputs()['queries']['parameter-name']`
168172

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+
![Add "triggerOutputs()" expression to trigger](./media/logic-apps-http-endpoint/trigger-outputs-expression.png)
170174

171-
1. Under the Request trigger, select **New step** > **Add an action**.
175+
In the **Body** property, the expression resolves to the `triggerOutputs()` token.
172176

173-
1. Under **Choose an action**, in the search box, enter `response` as your filter.
177+
![Resolved "triggerOutputs()" expression](./media/logic-apps-http-endpoint/trigger-outputs-expression-token.png)
174178

175-
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:
176180

177-
1. To build the expression, follow these steps:
181+
![Resolved expression for parameter name](./media/logic-apps-http-endpoint/resolved-expression-parameter-token.png)
178182

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

181-
1. In the **Expression** box, enter this expression, replacing `<parameter-name` with the parameter name that you want to use, and select **OK**.
185+
`"body": "@{triggerOutputs()['queries']['parameter-name']}",`
182186

183-
`triggerOutputs()['queries']['<parameter-name>']`
187+
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:
184188

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+
![Add example "triggerOutputs()" expression to trigger](./media/logic-apps-http-endpoint/trigger-outputs-expression-postal-code.png)
186190

187-
![Add "Relative path" property to trigger](./media/logic-apps-http-endpoint/trigger-outputs-expression.png)
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.
188192

189-
For example, suppose that you want the Response action to return `Postal Code: {postalCode}`.
193+
`...?{parameter-name=parameter-value}&api-version=2016-10-01...`
190194

191-
In the **Body** property, enter `Postal Code: ` with a trailing space. From the dynamic content list that appears, select the **postalCode** token.
195+
`https://prod-07.westus.logic.azure.com:433/workflows/{logic-app-resource-ID}/triggers/manual/paths/invoke?{parameter-name=parameter-value}&api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig={shared-access-signature}`
192196

193-
1. In the Response action's **Body** property,
197+
To put the parameter name and value in a different position within the URL, make sure to use the ampersand (`&`) as a prefix, for example:
194198

195-
1. To test the endpoint, edit the endpoint URL that you copied
199+
`...?api-version=2016-10-01&{parameter-name=parameter-value}&...`
200+
201+
This example shows the callback URL with the sample parameter name and value `postalCode=123456` in different positions within the URL:
202+
203+
* 1st position: `https://prod-07.westus.logic.azure.com:433/workflows/XXXXXXXXXXXXXXXXXXXXXX/triggers/manual/paths/invoke?postalCode=123456&api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=ZZZZZZZZZZZZZZZZZZZZZZZZ`
204+
205+
* 2nd position: `https://prod-07.westus.logic.azure.com:433/workflows/XXXXXXXXXXXXXXXXXXXXXX/triggers/manual/paths/invoke?api-version=2016-10-01&postalCode=123456&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=ZZZZZZZZZZZZZZZZZZZZZZZZ`
196206

197207
<a name="relative-path"></a>
198208

@@ -202,17 +212,15 @@ For example, suppose that you want the Response action to return `Postal Code: {
202212

203213
![Add "Relative path" property to trigger](./media/logic-apps-http-endpoint/select-add-new-parameter-for-relative-path.png)
204214

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}`.
206216

207217
![Specify the relative path for the parameter](./media/logic-apps-http-endpoint/relative-path-url-value.png)
208218

209219
1. To use the parameter, find and add a **Response** action to your logic app.
210220

211221
1. Under the Request trigger, select **New step** > **Add an action**.
212222

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

217225
1. In the Response action's **Body** property, include the token that represents the parameter that you specified in your trigger's relative path.
218226

@@ -228,13 +236,11 @@ For example, suppose that you want the Response action to return `Postal Code: {
228236

229237
1. Save your logic app.
230238

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

233-
```http
234-
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}
235-
```
241+
`https://prod-07.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}`
236242

237-
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.
238244

239245
Your browser shows this text: `Postal Code: 123456`
240246

-7.34 KB
Loading
12 Bytes
Loading
1.85 KB
Loading
30.5 KB
Loading
1.95 KB
Loading
-1.07 KB
Loading

0 commit comments

Comments
 (0)