Skip to main content

Event Hooks

The Event Hooks service is a centralized hub for handling event notifications from the near-lake stream. It enables users to receive near real-time events at user-specified URLs, ensuring timely notifications for specific events occurring within their shard.

Setting up Event Hooks

To use the Event Hooks, you need to enable it manually in the Console by following these steps:

  1. Open the Calimero console and navigate to the Event Hooks section in the side menu.

  2. Click on the Enable feature button.

Screenshot 2023-06-12 at 12 59 44
  1. Click on the Add webhook button to register a new webhook.
Screenshot 2023-06-12 at 17 58 45
  1. Set up your webhook by providing a unique URL for event reception. Optionally, you can add an authorization token to enhance security.
Screenshot 2023-06-12 at 17 59 00
  1. Select the events you want to receive notifications for or enter your regex to match the logs.
Screenshot 2023-06-12 at 18 23 43
  1. Click on the Save button to save your webhook configuration.
Screenshot 2023-06-12 at 18 34 19

Once saved, you can access your webhook details.

All webhooks

Users have the flexibility to define multiple webhooks, each with a unique URL. If you wish to receive notifications for additional events at an existing URL, simply add those events to the existing webhook. This eliminates the need to create a new webhook for each event, allowing you to receive customized information for multiple events using a single webhook.

Received event

Once a defined event occurs, you will receive the corresponding data on your configured webhook. Here is an example of a FunctionCall event:

Setup webhook