Webhook Management

The Webhook addon service needs to be enabled on the node for you to use webhooks.

Follow the guide to manage the Webhook addon service here.

Webhook management is only possible for deployed subgraphs.

This section will guide you on how to manage your webhooks.

Handle Incoming Webhook Data

When configuring a webhook, it is imperative that the URL specified is capable of handling POST requests.

API Request Retry Policy

When initiating a request to a specified URL, the system will automatically attempt to connect up to three times at 30-minute intervals.

If, after three attempts, the URL remains unreachable, the data will be classified as an undelivered record.

Sample data payload that will be sent to the provided URL.

{
  "data": [
    {
      "id": "\\x1af00600",
      "vid": 50,
      "hour": 454682,
      "block$": 56200,
      "protocol": "\\x4200000000000000000000000000000000000010",
      "timestamp": 1636856051,
      "block_number": 56200,
      "cumulative_transaction_count": 1621,
      "cumulative_transfer_in_count": 1440,
      ...
    },
    {
      ...
    },
    {
      ...
    }
  ]
}

Create Webhook

On the subgraph detail page, navigate to the Webhooks section. Now, click on the '+' icon.

In the window that appears, choose the entities for whom you want to enable webhooks. Then, type in the URL of the location where you want the data for these entities to be sent.

Now, click the Create button to create webhooks for the selected entities.


Update Webhook

On the subgraph detail page, navigate to the Webhooks section.

Now, click the View Details button next to the entity you want to update.

On the window that appears, click the Edit button.

Update the required fields and then click on the Update button for the changes to take place.


Undelivered Records

On the subgraph detail page, navigate to the Webhooks section. Then, click the View Details button next to the entity you want to check for undelivered records.

On the window that appears, navigate to the Undelivered Records section.

In case, there are no undelivered records, the following message will be displayed.

If undelivered records are present then you can access them and try again to get them delivered by clicking on the Try Again button.


Delete Webhook

On the subgraph detail page, navigate to the Webhooks section. Now, click the Delete button against the entity for whom you want to delete the webhook and stop receiving updates.

Now, click on the Delete button to delete the webhook.

NOTE: In case you want to remove all webhooks from the subgraph, click the Delete All button at the top right.

Now, click the Delete button to delete all the webhooks.

Last updated