What is SharePoint Web hooks?
If user wants to get notified when certain events are taken place in SharePoint artifacts like SharePoint List and document library.
SharePoint Web hooks give opportunity or I can say a liberty from where developer can build applications that can receive notifications on specific changes has been made on SharePoint resources.
Web hooks are easier to created and consume. It provides simple pipeline which can notified your application regarding changes has been made to a SharePoint list without polling the service or you do not need to interact with SharePoint list by certain services.
What are limitations of SharePoint Web hooks?
Currently, webhooks are enabled on SharePoint list items only.
It covers the events corresponding to list item changes for a given SharePoint list and document library.
only asynchronous events are supported by webhooks.
Synchronous events are not supported in webhooks.
Your application will be notified for the following asynchronous list item events in SharePoint:
How to create subscription to SharePoint list?
Creates a new webhook subscription on SharePoint list.
The application must have at least edit permission on SharePoint list and site.
If User is using Azure Active directory application then they must grant Azure Ad application below permission.
Application : Office 365 SharePoint Online
Permission : Read and write items and list in site collections.
Below Rest end point is used to generate Subscription on list