Got RESTful APIs?
Great. API consumers love them. But today, such RESTful APIs are not enough for the evolving expectations of API consumers. Their apps need to be responsive, event-based and react to changes in near real-time.
This results in a new set of requirements for the APIs, which power the apps. APIs now need to provide concepts such as events, notifications, triggers, and subscriptions. These concepts are not natively supported by the REST architectural style.
The good thing: we can engineer RESTful APIs that support events with a webhook infrastructure. The bad thing: it requires some heavy lifting. The webhook infrastructure needs to be developer-friendly, easy to use, reliable, secure and highly available.
With the best practices and design templates provided in this book, we want to help you extend your API portfolio with a modern webhook infrastructure. So you can offer both APIs and events that developers love to use.
Webhooks are a collection of best practices for supporting events in a RESTful architecture.
But what exactly are the best practices? How do webhooks work and can webhooks be used? How shall webhooks be designed to be most useful for API consumers? This book helps you find the answer for your API and application.
When using and designing webhooks, there are a couple of stumbling blocks that you typically come across. Don’t let them trip you up! There are the roles of provider and consumer, resulting in different perspectives on webhooks and various interactions around webhooks which are often confused. Unfortunately, inconsistent documentation of webhooks and an unclear or contradictory terminology result in a lot of unnecessary confusion around webhooks. In addition, designers need to be aware of the choices they have when designing webhooks and what these choices entail.
In this book, we provide a clean terminology for webhooks, as a basis for a clean design for webhooks following the REST constraints. We study design choices that need to be made when designing webhooks for your application and API portfolio, and we consider the resulting non-functional properties of the webhook design. As always, there are tradeoff decisions involved, allowing you to design webhooks that best fit your application, use-case, clients, and APIs. In addition, we provide some practical guidance and tools for developing and testing webhook integrations. We study the webhook designs of some well-known APIs to see these concepts in action and to get some inspiration for the design of our own webhooks. We also survey alternative approaches, technologies, and standards for supporting events.
The API-University Series is a modular series of books on API-related topics. Each book focuses on a particular API topic, so you can select the topics within APIs, which are relevant to you.
Keywords: Webhooks, API, REST, Event, Web Hook, Callback, Notification
***** Great book!
Get the Book
Title: Webhooks – Events for RESTful APIs