APIs are not enough for the evolving expectations of API consumers. The apps of API consumers need to be responsive, event-based and react to changes in near real-time. APIs alone cannot deliver this, we need APIs and events.
Want to see some examples? Just check out the integrations built on platforms such as IFTTT or Zapier.
• Notify the team via instant messaging when a new customer signs up
• Notify the client when a recurring credit card payment fails
• Notify the client when an SMS text message could not be delivered
The pattern for these integrations is: an event triggers the integration workflow (e.g. customer signs up) and the integration uses the event data to call one or multiple APIs (e.g. instant messaging API). In this simple use case, we can clearly see the two essential concepts, which are required for integration: APIs and events.
• APIs allow for reading and writing data, calling functionality and starting processes. APIs connect us with actuators in the digital world that enable us to do and change things.
• Events allow for reacting to things happening in the environment. Events connect us with sensors in the digital world that wake us up, tell us that things have changed and what exactly has changed.
How do we realize events in an API context? In the new book, we study several approaches for realizing events and then focus in on webhooks. We study the concepts of webhooks and the overall architecture to make them work. We go into the detailed non-functional properties of a webhooks-based solution, such as security, reliability and developer experience. We show how to make webhooks work in a RESTful API portfolio with some detailed design proposals in OpenAPI.