Skip to content

Commit f21c658

Browse files
authored
Merge pull request #114659 from ecfan/patch-4
Clarify when engine doesn't need to unsubscribe
2 parents 83bf60b + c9c981a commit f21c658

File tree

1 file changed

+18
-34
lines changed

1 file changed

+18
-34
lines changed

articles/logic-apps/logic-apps-create-api-app.md

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: Create web APIs & REST APIs for Azure Logic Apps
33
description: Create web APIs & REST APIs to call your APIs, services, or systems for system integrations in Azure Logic Apps
44
services: logic-apps
55
ms.suite: integration
6-
ms.reviewer: klam, jehollan, logicappspm
7-
ms.topic: article
6+
ms.reviewer: jonfan, logicappspm
7+
ms.topic: conceptual
88
ms.date: 05/26/2017
99
---
1010

@@ -250,25 +250,17 @@ callback from your API when work is complete. Your API then calls back
250250
with an HTTP POST to the URL and passes any returned content and
251251
headers as input to the logic app.
252252

253-
* `unsubscribe` endpoint: If the logic app run is canceled,
254-
the Logic Apps engine calls the `unsubscribe` endpoint.
255-
Your API can then unregister the callback URL and stop any processes as necessary.
253+
* `unsubscribe` endpoint: If the logic app run is canceled, the Logic Apps engine calls the `unsubscribe` endpoint. Your API can then unregister the callback URL and stop any processes as necessary.
256254

257255
![Webhook action pattern](./media/logic-apps-create-api-app/custom-api-webhook-action-pattern.png)
258256

259-
> [!NOTE]
260-
> Currently, the Logic App Designer doesn't support
261-
> discovering webhook endpoints through Swagger.
262-
> So for this pattern, you have to add a
263-
> [**Webhook** action](../connectors/connectors-native-webhook.md)
264-
> and specify the URL, headers, and body for your request.
265-
> See also [Workflow actions and triggers](logic-apps-workflow-actions-triggers.md#apiconnection-webhook-action).
266-
> To pass in the callback URL, you can use the `@listCallbackUrl()`
267-
> workflow function in any of the previous fields as necessary.
257+
Currently, the Logic App Designer doesn't support discovering webhook endpoints through Swagger. So for this pattern, you have to add a [**Webhook** action](../connectors/connectors-native-webhook.md) and specify the URL, headers, and body for your request. See also [Workflow actions and triggers](logic-apps-workflow-actions-triggers.md#apiconnection-webhook-action). For an example webhook pattern, review this [webhook trigger sample in GitHub](https://github.com/logicappsio/LogicAppTriggersExample/blob/master/LogicAppTriggers/Controllers/WebhookTriggerController.cs).
268258

269-
> [!TIP]
270-
> For an example webhook pattern, review this
271-
> [webhook trigger sample in GitHub](https://github.com/logicappsio/LogicAppTriggersExample/blob/master/LogicAppTriggers/Controllers/WebhookTriggerController.cs).
259+
Here are some other tips and notes:
260+
261+
* To pass in the callback URL, you can use the `@listCallbackUrl()` workflow function in any of the previous fields as necessary.
262+
263+
* If you own both the logic app and the subscribed service, you don't have to call the `unsubscribe` endpoint after the callback URL is called. Otherwise, the Logic Apps runtime needs to call the `unsubscribe` endpoint to signal that no more calls are expected and to allow for resource clean up on the server side.
272264

273265
<a name="triggers"></a>
274266

@@ -348,28 +340,20 @@ When there's new data or an event that meets the specified condition,
348340
your API calls back with an HTTP POST to the URL.
349341
The content payload and headers pass as input to the logic app.
350342

351-
* `unsubscribe` endpoint: If the webhook trigger or entire logic app is deleted,
352-
the Logic Apps engine calls the `unsubscribe` endpoint.
343+
* `unsubscribe` endpoint: If the webhook trigger or entire logic app is deleted, the Logic Apps engine calls the `unsubscribe` endpoint.
353344
Your API can then unregister the callback URL and stop any processes as necessary.
354345

355346
![Webhook trigger pattern](./media/logic-apps-create-api-app/custom-api-webhook-trigger-pattern.png)
356347

357-
> [!NOTE]
358-
> Currently, the Logic App Designer doesn't support
359-
> discovering webhook endpoints through Swagger.
360-
> So for this pattern, you have to add a
361-
> [**Webhook** trigger](../connectors/connectors-native-webhook.md)
362-
> and specify the URL, headers, and body for your request.
363-
> See also [HTTPWebhook trigger](logic-apps-workflow-actions-triggers.md#httpwebhook-trigger).
364-
> To pass in the callback URL, you can use the `@listCallbackUrl()` workflow
365-
> function in any of the previous fields as necessary.
366-
>
367-
> To prevent processing the same data multiple times,
368-
> your trigger should clean up data that was already read and passed to the logic app.
348+
Currently, the Logic App Designer doesn't support discovering webhook endpoints through Swagger. So for this pattern, you have to add a [**Webhook** trigger](../connectors/connectors-native-webhook.md) and specify the URL, headers, and body for your request. See also [HTTPWebhook trigger](logic-apps-workflow-actions-triggers.md#httpwebhook-trigger). For an example webhook pattern, review this [webhook trigger controller sample in GitHub](https://github.com/logicappsio/LogicAppTriggersExample/blob/master/LogicAppTriggers/Controllers/WebhookTriggerController.cs).
369349

370-
> [!TIP]
371-
> For an example webhook pattern, review this
372-
> [webhook trigger controller sample in GitHub](https://github.com/logicappsio/LogicAppTriggersExample/blob/master/LogicAppTriggers/Controllers/WebhookTriggerController.cs).
350+
Here are some other tips and notes:
351+
352+
* To pass in the callback URL, you can use the `@listCallbackUrl()` workflow function in any of the previous fields as necessary.
353+
354+
* To prevent processing the same data multiple times, your trigger should clean up data that was already read and passed to the logic app.
355+
356+
* If you own both the logic app and the subscribed service, you don't have to call the `unsubscribe` endpoint after the callback URL is called. Otherwise, the Logic Apps runtime needs to call the `unsubscribe` endpoint to signal that no more calls are expected and to allow for resource clean up on the server side.
373357

374358
## Improve security for calls to your APIs from logic apps
375359

0 commit comments

Comments
 (0)