Skip to content

Commit 341444f

Browse files
authored
Merge pull request SharePoint#173 from SharePoint/staging
updated GitHub links and unordered lists.
2 parents 0961999 + 2d9c218 commit 341444f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/apis/webhooks/webhooks-reference-implementation.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,24 @@ Microsoft Azure is used to host the various components needed to implement Azure
2424

2525
## Source code for this reference implementation
2626

27-
Source code and other materials for the reference implementation are available in the [SharePoint developer samples GitHub repository](https://github.com/SharePoint/sp-dev-samples/tree/master/Samples/WebHooks).
27+
Source code and other materials for the reference implementation are available in the [SharePoint developer samples GitHub repository](https://aka.ms/sp-webhooks-sample-reference).
2828

2929
## Deploying the reference implementation
3030

3131
The application will show you how to manage webhooks, specifically for a SharePoint list. It also contains a reference implementation of a webhook service endpoint which you can reuse in your webhook projects.
3232

3333
![SharePoint webhook reference implementation application](../../../images/webhook-sample-application.png)
3434

35-
The [SharePoint web hooks reference implementation - Deployment guide](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks/Deployment%20guide.md) lists the deployment steps used to deploy the reference implementation.
35+
The [SharePoint web hooks reference implementation - Deployment guide](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks.List/Deployment%20guide.md) lists the deployment steps used to deploy the reference implementation.
3636

3737
## Introduction to webhooks
3838

3939
Webhooks notify your application about changes in SharePoint that the application needs to monitor. There's no need for your application to regularly poll for changes anymore. With webhooks your application is notified (**push** model) whenever there's a change. Webhooks are not specific to Microsoft. They are a universal web standard that's also being adopted by other vendors (e.g., WordPress, GitHub, MailChimp, and others).
4040

4141
### Adding a webhook to your SharePoint list
4242

43-
The reference implementation works with a SharePoint list. To add a webhook to a SharePoint list, your application first creates a webhook subscription by sending a [`POST /_api/web/lists('list-id')/subscriptions`](./create-subscription) request. The request includes the following items:
43+
The reference implementation works with a SharePoint list. To add a webhook to a SharePoint list, your application first creates a webhook subscription by sending a [`POST /_api/web/lists('list-id')/subscriptions`](./lists/create-subscription) request. The request includes the following items:
44+
4445
* A payload that identifies the list which you're adding the webhook for.
4546
* The ___location of your webhook service URL to send the notifications.
4647
* The expiration date of the webhook.
@@ -49,7 +50,7 @@ After you've requested SharePoint to add your webhook, SharePoint will validate
4950

5051
![Adding a webhook](../../../images/webhook-sample-add-process.png)
5152

52-
Take a look at the reference implementation, and you'll see that all webhook CRUD operations are consolidated in the [WebHookManager](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks/SharePoint.WebHooks.Common/WebHookManager.cs) class of the **SharePoint.WebHooks.Common** project. Adding a webhook is done using the **AddListWebHookAsync** method:
53+
Take a look at the reference implementation, and you'll see that all webhook CRUD operations are consolidated in the [WebHookManager](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks.List/SharePoint.WebHooks.Common/WebHookManager.cs) class of the **SharePoint.WebHooks.Common** project. Adding a webhook is done using the **AddListWebHookAsync** method:
5354

5455
```cs
5556
/// <summary>
@@ -106,7 +107,7 @@ In the previous step your service endpoint was called but SharePoint only provid
106107

107108
![Async GetChanges](../../../images/webhook-sample-async-getchanges.png)
108109

109-
You can learn more about the `GetChanges()` implementation in the **ProcessNotification** method in the [ChangeManager](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks/SharePoint.WebHooks.Common/ChangeManager.cs) class of the **SharePoint.WebHooks.Common** project.
110+
You can learn more about the `GetChanges()` implementation in the **ProcessNotification** method in the [ChangeManager](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks.List/SharePoint.WebHooks.Common/ChangeManager.cs) class of the **SharePoint.WebHooks.Common** project.
110111

111112
To avoid getting the same change repeatedly, it's important that you inform SharePoint from which point you want the changes. This is done by passing a **changeToken**, which also implies that your service endpoint needs to persist the last used **changeToken** so that it can be used the next time the service endpoint is called.
112113

@@ -145,7 +146,7 @@ Create a web job that on a weekly basis reads all the subscription IDs from the
145146

146147
> **Note:** This web job is not part of this reference implementation.
147148
148-
The actual renewal of a SharePoint list webhook can be done using a [`PATCH /_api/web/lists('list-id')/subscriptions(‘subscriptionID’)`](./update-subscription) REST call. In the reference implementation, updating of webhooks is implemented in the [WebHookManager](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks/SharePoint.WebHooks.Common/WebHookManager.cs) class of the **SharePoint.WebHooks.Common** project. Updating a webhook is done using the **AddListWebHookAsync** method:
149+
The actual renewal of a SharePoint list webhook can be done using a [`PATCH /_api/web/lists('list-id')/subscriptions(‘subscriptionID’)`](./lists/update-subscription) REST call. In the reference implementation, updating of webhooks is implemented in the [WebHookManager](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks.List/SharePoint.WebHooks.Common/WebHookManager.cs) class of the **SharePoint.WebHooks.Common** project. Updating a webhook is done using the **AddListWebHookAsync** method:
149150

150151
```csharp
151152
/// <summary>

0 commit comments

Comments
 (0)