Get all sent notifications

Getting all sent notifications means retrieving a list of all webhook notifications that have been triggered and sent by the Tatum system to the specified webhook listener URL. This list typically includes information about each fired webhook, such as the event details, timestamp, subscription identifier, and the status of the webhook (e.g., whether it was successfully delivered or encountered an error).

This functionality is useful for maintaining an overview of past webhook events, analyzing the event history, troubleshooting issues, or reconciling data between the Tatum system and your application. By examining the list of fired webhooks, you can gain insights into the events that have occurred on the monitored address(es) and identify any potential issues or discrepancies in your system's handling of these events.

How to get all sent notifications

When you request to get all fired webhooks using the tatum.notification.getAllExecutedWebhooks() operation, the Tatum system returns a collection of webhook events that have been triggered as a result of monitoring the specified blockchain address(es) and detecting events such as balance updates or contract interactions.

// yarn add @tatumio/tatum
import {TatumSDK, Network, Ethereum, Webhook, ResponseDto} from '@tatumio/tatum'

const tatum = await TatumSDK.init<Ethereum>({network: Network.ETHEREUM})

const {status, data}: ResponseDto<Webhook[]> = await tatum.notification.getAllExecutedWebhooks()

Playing with curl and having a need to define type of net, please, use query parameter type with testnet or mainnet values. Example:https://api.tatum.io/v4/subscription/webhook?pageSize=10&type=mainnet If you do not use it explicitly mainnet is set by default.

Method parameters

The method accepts the optional object with the following properties.

interface GetAllExecutedWebhooksQuery {
  /**
   * The number of items to return per page. Defaults to 10.
   */
  pageSize?: number
  /**
   * The page offset. Defaults to 0.
   */
  offset?: number
  /**
   * Order of the returned items. 'desc' means the most recent items are returned first. Defaults to 'desc'.
   */
  direction?: 'asc' | 'desc'
  /**
   * Filter failed notifications. If the present method will return only successful or failed results based on the filterFailed field.
   */
  filterFailed?: boolean
}
<