Codified by the team at Zapier, REST Hooks (RESTful WebHooks) is a collection of patterns that treat webhooks like subscriptions. These subscriptions are manipulated via a REST API just like any other resource. REST Hooks support subscription, notification, and publication through a RESTful interface. This retains the RESTful patterns by using HTTP GET, PUT, POST and DELETE to act on subscription, notification, and publication resources. In other words, the REST Hook pattern adheres to standard REST definitions
There are 4 primary components for creating REST Hooks:
- Create a subscription – the webhook needs to be tied to a subscriber URL in order to escape polling
- Send the hook – the API sends the data via a POST
- Unsubscribing – a delete call is made to unsubscribe
- Setting up a global URL – you can create a polling URL to create a permanent location from where to draw data
Comments