Generic Resource
PEPPERI NOTIFICATION SERVICE
Actions Queue
CPI Node
TODO training
Powered By GitBook
Subscribe
Subscribe addon to data change
Pepperi Notification Service is based on SNS, which is an AWS notification self-managed service. PNS interface is composed of two major components publish and subscribe
Subscribe enables the addons to register to a specific “object type” + attribute/s. Every time a message with the matched attributes will be published, The addon function that was registered will be called (POST) using the async API. The order of notifications is random.
A subscription function can be called more than once. This is due to the implementation of SNS and the way pepperi handles notifications
If the async callback fails the async retry mechanism will invoke it again up to 3 times
Addon cannot subscribe twice for the same name. name cannot contains white spaces
Resource Endpoint: /notification/subscriptions Support all standard resource endpoint functions
Sending Hidden=true will unsubscribe the addon from notifications
Example for filter policy is in the publish page, as filter attributes
post
https://api.pepperi.com
/v1.0/notification/subscriptions
Subscribe to data change
1
// example for subscribing to uninstall addon message
2
{
3
AddonUUID: "", // the addon you want to be started be PNS
4
AddonRelativeURL: "", // the path that will be started, for example /api/test
5
Type: "data",
6
Name: "",
7
FilterPolicy: {
8
Action:['update'],
9
ModifiedFields:['Hidden'],
10
Resource:['installed_addons'],
11
AddonUUID:['00000000-0000-0000-0000-000000000a91']
12
}
Copied!
1
// example for subscribing to adal table test1 owned by addon uuid 1e1963b4-87df-4f58-939a-e2a6dc71677a
2
{
3
AddonUUID: "", // the addon you want to be started be PNS
4
AddonRelativeURL: "", // the path that will be started, for example /api/test
5
Type: "data",
6
Name: "",
7
FilterPolicy: {
8
Action:['update'],
9
Resource:['test1'],
10
AddonUUID:['1e1963b4-87df-4f58-939a-e2a6dc71677a']
11
}
Copied!
Last modified 4mo ago