Create a storage webhook
Registers an endpoint for the database's storage object events (every branch's, made through the storage API; changes made with SQL directly on storage.objects send none). Each event is POSTed as JSON, signed with Chelabase-Signature: t=<unix>,v1=<hex HMAC-SHA256 of "<t>.<body>">, at least once, retried with backoff for up to 24 hours. A database keeps at most 100,000 undelivered events: past that its oldest events are dropped unsent. The secret is in this response only. A database has at most 20 endpoints.
Authorization
bearer In: header
Path Parameters
Database id
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Only objects of this bucket (by name, 1-100 bytes).
One or more of object.created, object.updated, object.deleted, object.moved.
Only object names starting with this (1-1024 bytes).
Where events are POSTed: https (http only where the operator allows it), at most
2048 bytes, no credentials, resolving only to public addresses.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/storage/webhooks" \ -H "Content-Type: application/json" \ -d '{ "events": [ "string" ], "url": "string" }'{ "secret": "string", "webhook": { "bucket": "string", "consecutive_failures": 0, "created_at": "2019-08-24T14:15:22Z", "database_id": "91088904-0b92-46ad-9240-e1afa0da22df", "disabled_reason": "string", "enabled": true, "enabled_since": "2019-08-24T14:15:22Z", "events": [ "string" ], "failing_since": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_attempt_at": "2019-08-24T14:15:22Z", "prefix": "string", "updated_at": "2019-08-24T14:15:22Z", "url": "string" }}