Many advanced API companies such as Github, Stripe, or Slack offer Webhooks. But do you really need them when you already have RESTful APIs?

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.

Webhooks Infrastructure

The good thing: we can engineer RESTful APIs that support events with a webhook infrastructure. The bad thing: it requires some heavy lifting. The infrastructure needs to be developer-friendly, easy to use, reliable, secure, and highly available.

Best Practices for Webhooks

Webhooks are a collection of best practices for supporting events in a RESTful architecture.

But what exactly are the best practices? 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. 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! How do they work and can they be used? How shall they be designed to be most useful for API consumers?

There are the roles of provider and consumer, resulting in different perspectives on webhooks and various interactions around webhooks which are often confused. In addition, designers need to be aware of the choices they have when designing webhooks and what these choices entail.

Webhooks Book

In this book, we provide a clean terminology for webhooks, as a basis for a clean design 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, such as security, performance, and availability. 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 webhooks designs of the well-known APIs of GitHub, Stripe, Slack, Intercom, and Bitbucket, to see these concepts in action. 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

Customer Reviews

⭐⭐⭐⭐⭐ Awesome
“Very nicely done and a good resource on how web hooks work. Also has examples of web hook APIs in the wild.”
2017-12-30
by unix_system_guy on Amazon.com

⭐⭐⭐⭐⭐ Great book!
“I have learned a lot in this book: why supporting events is important and how to actually build support for events. The book is easy to read and contains lot’s practical advice on designing web hooks. The design decisions are explained and motivated by non-functional properties. I especially liked the concrete web hook design in Swagger.”
2017-12-29
by Amazon Customer on Amazon.de

BookAuthority Best REST API Books of All Time

The Book

Book Webhooks - Events for Restful APIs

Buy PDF       $29.99

About

Title: Webhooks – Events for RESTful APIs
Author: Matthias Biehl
Release Date: 2017-12-22
Length: 130 pages
Language: English
ISBN-10: 1979717060
ISBN-13: 978-1979717069
Categories:
COMPUTERS > Web > Web Programming
COMPUTERS > Web > Web Services & APIs

Try it