webhooks
Creates, updates, deletes, gets or lists a webhooks resource.
Overview
| Name | webhooks |
| Type | Resource |
| Id | cloudflare.streams.webhooks |
Fields
The following fields are returned by SELECT queries:
- list
View webhooks response.
| Name | Datatype | Description |
|---|---|---|
modified | string (date-time) | The date and time the webhook was last modified. (example: 2014-01-02T02:20:00Z) |
notificationUrl | string (uri) | The URL where webhooks will be sent. (example: https://example.com) |
notification_url | string (uri) | The URL where webhooks will be sent. (example: https://example.com) |
secret | string | The secret used to verify webhook signatures. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id | Retrieves a list of webhooks. | |
update | replace | account_id | Creates a webhook notification. | |
delete | delete | account_id | Deletes a webhook. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
SELECT examples
- list
Retrieves a list of webhooks.
SELECT
modified,
notificationUrl,
notification_url,
secret
FROM cloudflare.streams.webhooks
WHERE account_id = '{{ account_id }}' -- required
;
REPLACE examples
- update
Creates a webhook notification.
REPLACE cloudflare.streams.webhooks
SET
notificationUrl = '{{ notificationUrl }}',
notification_url = '{{ notification_url }}'
WHERE
account_id = '{{ account_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Deletes a webhook.
DELETE FROM cloudflare.streams.webhooks
WHERE account_id = '{{ account_id }}' --required
;