Managing webhooks
VK Object Storage allows you to configure notifications about adding or deleting an object from a bucket.
-
Go to the VK Cloud management console.
-
Select the project that contains the desired bucket.
-
Go to the Object Storage → Buckets section.
-
Open the bucket settings in one of the following ways:
- Click
for the desired bucket and select Settings.
- Click the name of the desired bucket, then click the
button on the bucket page.
- Click
-
Go to the Webhooks tab and click the
Add button.
-
Specify the webhook parameters:
-
ID: the webhook name. The name must be unique within a single bucket.
-
Event: events upon which a notification should be sent:
ObjectCreated— adding an object to the bucket by any method, includes thePutObject,PutObjectCopy, andCompleteMultipartUploadevents;PutObject— adding an object;PutObjectCopy— adding a copy of an object;CompleteMultipartUpload— adding an object using the multipart method;ObjectRemoved— deleting an object by any method, includes theDeleteObjectevent;DeleteObject— deleting an object.
-
URL: the address of the webhook receiving server. For example,
http://83.166.234.90/webhook. To receive webhooks, ports80or443must be configured on the server. -
Filter prefix: a filter that allows generating webhooks for events only for objects whose names contain the specified prefix. For example, if you enter the value
images, webhooks will be sent when objects such asbucket\images\picture.png,bucket\images\picture.svgare modified. In the management console, the prefix is displayed as a directory. -
Filter suffix: a filter that allows generating webhooks for events only for objects whose names contain the specified suffix. For example, if you enter the value
png, webhooks will be sent when files with the.pngextension are modified.
-
-
Click the Add hook button.
You can study the webhook exchange mechanism in VK Object Storage in detail using the example of creating an event-driven application.
-
Go to the VK Cloud management console.
-
Select the project that contains the desired bucket.
-
Go to the Object Storage → Buckets section.
-
Open the bucket settings in one of the following ways:
- Click
for the desired bucket and select Settings.
- Click the name of the desired bucket, then click the
button on the bucket page.
- Click
-
Go to the Webhooks tab.
-
Click
for the desired webhook and select
Edit hook.
-
Edit the webhook parameters.
-
Click the Save changes button.
This is a group operation: if necessary, you can delete multiple webhooks by selecting them using checkboxes.
-
Go to the VK Cloud management console.
-
Select the project that contains the desired bucket.
-
Go to the Object Storage → Buckets section.
-
Open the bucket settings in one of the following ways:
- Click
for the desired bucket and select Settings.
- Click the name of the desired bucket, then click the
button on the bucket page.
- Click
-
Go to the Webhooks tab.
-
Delete the webhook in one of the following ways:
- Click
for the desired webhook and select
Delete hook.
- Check the checkbox for the desired webhook and click the
Delete button.
- Click
-
Confirm the deletion.