Skip to content

Commit f7f900d

Browse files
authored
fix: Object notifications using partner api (#306)
1 parent 889e3fa commit f7f900d

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

static/api/extensions/v1/api.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,79 @@ components:
641641
type: boolean
642642
description:
643643
If set to true, per object ACL will be enabled. Default is false.
644+
object_notifications:
645+
$ref: "#/components/schemas/ObjectNotifications"
646+
ObjectNotifications:
647+
type: object
648+
description: |
649+
Configuration for object event notifications via webhook. Receive HTTP callbacks when objects are created, updated, or deleted in your bucket.
650+
651+
**Update behavior:**
652+
- `enabled` is required in all requests
653+
- Other fields (webhook, filter, region, auth) are optional and only update when included
654+
- Omitted optional fields preserve their existing values
655+
- Auth credentials are masked in responses and don't need to be re-sent
656+
657+
**Common operations:**
658+
```json
659+
// Enable notifications (must provide webhook on first enable)
660+
{"enabled": true, "webhook": "https://webhook.example.com/events"}
661+
662+
// Disable temporarily (preserves all config for re-enabling later)
663+
{"enabled": false}
664+
665+
// Update webhook while keeping enabled state
666+
{"enabled": true, "webhook": "https://new-endpoint.com"}
667+
668+
// Change filter only
669+
{"enabled": true, "filter": "size > 1000000"}
670+
671+
// Remove all notifications
672+
{"enabled": false}
673+
```
674+
675+
**Note:** Auth credentials are masked in responses. You don't need to re-send them when updating other fields.
676+
required:
677+
- enabled
678+
properties:
679+
enabled:
680+
type: boolean
681+
description:
682+
Enable or disable notifications. When true, webhook must be
683+
provided.
684+
webhook:
685+
type: string
686+
format: uri
687+
description: HTTPS endpoint to receive notification events
688+
example: "https://webhook.example.com/tigris-events"
689+
filter:
690+
type: string
691+
description:
692+
SQL WHERE clause to filter which objects trigger notifications
693+
(e.g., size comparisons)
694+
example: "size > 1000000"
695+
region:
696+
type: string
697+
description:
698+
Region to process notifications from (defaults to server region)
699+
example: "iad"
700+
auth:
701+
$ref: "#/components/schemas/ObjectNotificationAuth"
702+
ObjectNotificationAuth:
703+
type: object
704+
description: Authentication credentials for webhook endpoint
705+
properties:
706+
basic_user:
707+
type: string
708+
description: Basic auth username
709+
basic_pass:
710+
type: string
711+
description: Basic auth password
712+
format: password
713+
token:
714+
type: string
715+
description: Bearer token for authorization
716+
format: password
644717
ProvisioningResponse:
645718
type: object
646719
UpdateBucketRequest:
@@ -656,6 +729,8 @@ components:
656729
type: boolean
657730
description:
658731
If set to true, per object ACL will be enabled. Default is false.
732+
object_notifications:
733+
$ref: "#/components/schemas/ObjectNotifications"
659734
UpdateBucketResponse:
660735
type: object
661736
DeleteBucketResponse:
@@ -866,6 +941,8 @@ components:
866941
description: If set to true, per object ACL is enabled
867942
website:
868943
$ref: "#/components/schemas/BucketWebsiteSettings"
944+
object_notifications:
945+
$ref: "#/components/schemas/ObjectNotifications"
869946
GetUsageResponse:
870947
type: object
871948
properties:

0 commit comments

Comments
 (0)