Event Notifications

Filebase Event Notifications are triggered by changes in data within your storage buckets, allowing you to automate workflows and tasks against IPFS content in real-time.

You can use Event Notifications in many types of workflows. Here are some examples:

  • Transcoding video files after upload

  • Recording object CIDs to a database after a pre-signed URL object upload

  • Triggering a file download on a server to fetch the latest updates

Supported Event Types

The following event types are supported:

  • s3:ObjectCreated:*

  • s3:ObjectCreated:Copy

  • s3:ObjectCreated:MultipartUpload

  • s3:ObjectCreated:Pin

  • s3:ObjectCreated:Put

  • s3:ObjectCreated:WebUpload

  • s3:ObjectRemoved:*

  • s3:ObjectRemoved:Delete

Event Payloads

Events are JSON-based and are sent using an HTTP POST request.

The endpoint URL must be an application or server that can accept HTTP POST requests. A 200 OK response code must be returned. If a non-200 code is returned, Filebase will consider the event delivery a failure and retry sending.

This is what an example event looks like:

{
  "events": [
    {
      "accountId": "1f657f8d-50ab-5e8c-808c-f7c0c4f8be1a",
      "bucketId": "b5a7ff07-2e07-5aee-b859-eaa136c5d723",
      "bucketName": "my-bucket",
      "eventId": "3900a5ad-93e1-4264-864a-5e65d74e7a4e",
      "eventTimestamp": 1727805541,
      "eventType": "s3:ObjectCreated:WebUpload",
      "eventVersion": 1,
      "matchedRuleName": "EasyEvents-All",
      "objectName": "my-file",
      "objectSize": 119762,
      "objectCid": "QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
    }
  ]
}

Configuring Notifications

Event Notifications are configured and set at the bucket level. This means each bucket can have it's own unique event configuration. Event configurations can be created, modified, or removed by using the Filebase Dashboard or API.

Dashboard

  1. Login to the Filebase Dashboard and navigate to the Buckets page.

  2. Open the Options menu for a bucket and select Configure Events.

  3. Choose the desired Events Configuration and set an Endpoint URL.

Last updated