Skip to main content

Rule Patterns

Each rule must specify a pattern which is used to evaluate whether that rule applies to an event or not. Consider the following event submitted by the device:

{
"eventSource": "source-nodeid"
"eventType":"event-name-you-specify",
"timestamp": 0,
"data": {
"key1": "value1",
"key2": {
"key3":"value3"
},
"anarray": ["i1", "i2", "i3"]
}
}

Patterns exist to match Fields in incoming Events. A Field is the combination of a Leaf value and a Path, a list of strings which are the Field names that must be traversed to reach it from the Event root JSON Object. A Pattern MUST be a JSON object all of whose Leaf values MUST be in arrays.

{}   //Matches all events
{
"eventSource": ["specific-nodeid-1", "specific-nodeid-2"] // Matches events from node 1 or node 2
}
{
"eventType": ["event-type-1", "event-type-2"] // Matches when event type is event-type-1 or event-type-2
}
{"data":{"key1":["value1"]} // Matches with events in which data contains a key1 field with value: value1
⚠️Work in Progress!

This page is being modified continuously and will be updated frequently. We are continuously adding content to the documentation. Feel free to get in touch with Team Anedya for any assistance.