Generic Resource
PEPPERI NOTIFICATION SERVICE
Actions Queue
CPI Node
TODO training

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
Subscribe to data change

https://api.pepperi.com/v1.0/notification/subscriptions
Request
Response
Request
Headers
X-Pepperi-SecretKey
required
string
addon key
X-Pepperi-OwnerID
required
string
The requested addonUUID
Body Parameters
object
optional
object
See Response
Response
200: OK
successfully retrieved.
{
"Name": "", // Mandatory
"AddonUUID": "", // Mandatory
"Type": "data" | "action" | "event", // Mandatory on create
"AddonRelativeURL": "/file/func" // Mandatory on create
"FilterPolicy": {
[key: string]: string[]
}
}
// example for subscribing to uninstall addon message
{
AddonUUID: "", // the addon you want to be started be PNS
AddonRelativeURL: "", // the path that will be started, for example /api/test
Type: "data",
Name: "",
FilterPolicy: {
Action:['update'],
ModifiedFields:['Hidden'],
Resource:['installed_addons'],
AddonUUID:['00000000-0000-0000-0000-000000000a91']
}

// example for subscribing to adal table test1 owned by addon uuid 1e1963b4-87df-4f58-939a-e2a6dc71677a
{
AddonUUID: "", // the addon you want to be started be PNS
AddonRelativeURL: "", // the path that will be started, for example /api/test
Type: "data",
Name: "",
FilterPolicy: {
Action:['update'],
Resource:['test1'],
AddonUUID:['1e1963b4-87df-4f58-939a-e2a6dc71677a']
}