Skip to content

Configuration of Events

You can choose to be notified for object events (add, update or delete) for your space in Data Lake. It allows you to subscribe for event notifications generated when the objects of a tenant or subtenant are created, updated or deleted.

Multiple subscriptions for the same path can be created when each has a different destination. Similarly, multiple subscriptions for the same destination can be created when each has a different path.

Maximum 15 subscriptions can be created for a tenant or subtenant. Path in request payload should be upto folders and not upto object e.g. “myfolder/mysubfolder”

Subscribe to the event notification

To create Event Subscription - Once this step is performed IDL will subscribe to the intended SNS topic.

1
POST /objectEventSubscriptions
1
Content-Type: application/json

Request example:

1
2
3
4
5
{
    "path": "myfolder/mysubfolder",
    "destination": "aws-sns://arn:aws:sns:region:account-id:topicname",
    "subtenantId": "204a896c-a23a-11e9-a2a3-2a2ae2dbcce4"
}

Response example:

1
2
3
4
5
6
7
8
{
    "id": "7dc53df5703e49b38670b1c468f47f1f",
    "storageAccount": "dlbucketname",
    "storagePath": "data/sub=subtenantId/myfolder/mysubfolder",
    "destination": "aws-sns://arn:aws:sns:region:account-id:topicname",
    "eTag": 1,
    "subtenantId": "204a896c-a23a-11e9-a2a3-2a2ae2dbcce4"
}

Get the details of events subscribed

You can get the details of SNS topics to which you are already subscribed. It will list object event subscriptions for the tenant or subtenant. If requester is tenant, all the subscriptions for the tenant as well as its all subtenants are returned. If requester is a subtenant, all the subscriptions for the subtenant are returned. If tenant wants to filter results for a particular subtenant, filter query parameter subtenantId can be used. This filter query parameter is applicable only if the requester is tenant.

1
GET /objectEventSubscriptions/7dc53df5703e49b38670b1c468f47f1f

Response example:

1
2
3
4
5
6
7
8
{
    "id": "7dc53df5703e49b38670b1c468f47f1f",
    "storageAccount": "dlbucketname",
    "storagePath": "data/sub=subtenantId/myfolder/mysubfolder",
    "destination": "aws-sns://arn:aws:sns:region:account-id:topicname",
    "eTag": 1,
    "subtenantId": "204a896c-a23a-11e9-a2a3-2a2ae2dbcce4"
}

Edit created subscription

You can also edit the created subscription.

1
PATCH /objectEventSubscriptions/7dc53df5703e49b38670b1c468f47f1f
1
Content-Type: application/json

Request example:

1
2
3
4
{
    "path": "myCustomPath",
    "destination": "aws-sns://arn:aws:sns:region:account-id:topicname"
}

Response example:

1
2
3
4
5
6
7
8
{
    "id": "7dc53df5703e49b38670b1c468f47f1f",
    "storageAccount": "dlbucketname",
    "storagePath": "data/sub=subtenantId/myfolder/mysubfolder",
    "destination": "aws-sns://arn:aws:sns:region:account-id:topicname",
    "eTag": 1,
    "subtenantId": "204a896c-a23a-11e9-a2a3-2a2ae2dbcce4"
}

Delete the subscription

You can delete the created subscription if you do not want any further notifications.

1
PATCH /objectEventSubscriptions/7dc53df5703e49b38670b1c468f47f1f

Response example

1
Status 204 No Content

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.