|
DLI LPC9 Object Model Reference
|
| object | notification/ |
| Object representing the event notification server configuration | |
Retrieving the value is denied if not administrative user
This object contains the following items:
| sinks | Sinks |
| rules | Rules |
| known_sink_types | Sink types |
| sink_data_item_groups | Sink data item groups |
Sample CLI write command:
uom set notification ...
Sample uom library read command:
print(uom.dump(uom.notification))
⇒
<...>
| array | notification/sinks/ |
| Sink array | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This array represents a value in persistent storage.
This array contains Sink elements.
Sample requests sink creation command:
requests.post('http://192.168.0.100/restapi/notification/sinks/',auth=auth,headers=headers,json={'test': [{'value': 'function'}], 'type': 'xmpp', 'name': 'kevin', 'data': {'password': 'aMV', 'sender': 'donald@a98as.example.com', 'recipient': 'jason@ixus.1qgv.4j8o.example.com'}})
Sample CLI write command:
uom set "notification/sinks" ...
| object | notification/sinks/N/ |
| Event sink | |
Retrieving the value is denied if not administrative user
This object represents a value in persistent storage.
This object contains the following items:
| name | Name |
| type | Type |
| data | Data |
| test | Test |
Sample uom library read command (note that _sink_index is a variable):
print(uom.dump(uom.notification.sinks[_sink_index]))
⇒
{data={password="",recipient="brian@pmzevl.example.com",sender="joseph@7m62n0.example.com"},name="joseph",test={{value="function"},arguments={},results={true}},type="xmpp"}
Sample curl read command (note that :sink_index is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/notification/sinks/:sink_index/"
⇒
See also Sink: Name
See also Sink: Type
See also Sink: Data
See also Sink: Test
| string | notification/sinks/N/name/ |
| Sink name (can be shared between sinks) | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample uom library read command (note that _sink_index is a variable):
print(uom.dump(uom.notification.sinks[_sink_index].name))
⇒
"john"
Sample curl write command (note that :sink_index is a URL template argument):
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "\"kevin\"" "http://192.168.0.100/restapi/notification/sinks/:sink_index/name/"
| string | notification/sinks/N/type/ |
| Sink type | |
The value is subject to the following constraints: sink types[the value]
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample curl write command (note that :sink_index is a URL template argument):
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "\"snmpv3i\"" "http://192.168.0.100/restapi/notification/sinks/:sink_index/type/"
Sample CLI write command (note that sink_index is a variable):
uom set "notification/sinks/${sink_index}/type" "\"webhook\""
| map | notification/sinks/N/data/ |
| Sink-type-specific data | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This map represents a value in persistent storage.
This map contains Data item elements.
Sample CLI data item creation command (note that sink_index is a variable):
uom insert "notification/sinks/${sink_index}/data/recipient_addresses" "\"\""
Sample curl write command (note that :sink_index is a URL template argument):
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "{\"trap_oid\":\"0.5,,,,\",\"server\":\"70ow.example.com\",\"community\":\"I(\"}" "http://192.168.0.100/restapi/notification/sinks/:sink_index/data/"
| string | notification/sinks/N/data/S/ |
| Item of sink-type-specific data | |
The value is subject to the following constraints: the value matches sink types[type].data_items[index of the value].regexp
Retrieving the value is denied if any of the following is true:
Changing the value is denied if any of the following is true:
Using the string as a field for indexing into the grandparent collection is denied if any of the following is true:
This string represents a value in persistent storage.
This string should be displayed in a secure manner if all of the following is true:
Sample CLI deletion command (note that sink_index and data_item are variables):
uom remove "notification/sinks/${sink_index}/data/${data_item}"
Sample curl read command (note that :sink_index and :data_item are URL template arguments):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/notification/sinks/:sink_index/data/:data_item/"
⇒
"https://jxr5.example.com/"
| call | notification/sinks/N/test/ |
| Send a test notification using this sink | |
Performing the function call is denied if not administrative user
The call has no arguments (supply empty tuple).
The call returns the following results:
Sample uom library invocation (note that _sink_index is a variable):
print(uom.dump(uom.notification.sinks[_sink_index].test()))
⇒
"Sink handler indicates notification failure, check log for errors"
Sample CLI invocation (note that sink_index is a variable):
uom invoke "notification/sinks/${sink_index}/test"
⇒
true
| sum (variant) | notification/sinks/N/test/results: 1/ |
| Notification success or failure message | |
This sum does not correspond to an actual resource.
This sum can assume the following values:
| constant true | Success | The notification has succeeded | |
| string | Failure | The notification has failed with the following error | |
| array | notification/rules/ |
| Event processing rule list | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This array represents a value in persistent storage.
This array contains Rule elements.
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "[{\"condition\":\"severity>=INFO\",\"action\":\"notify(\\\"kevin\\\")\"},{\"condition\":\"severity>=CRITICAL\",\"action\":\"notify(\\\"kevin\\\")\"}]" "http://192.168.0.100/restapi/notification/rules/"
Sample requests write command:
requests.put('http://192.168.0.100/restapi/notification/rules/',auth=auth,headers=headers,json=[{'condition': 'severity>=ERROR', 'action': 'notify("kevin")'}, {'condition': 'severity>=EMERGENCY', 'action': 'notify("robert")'}, {'condition': 'severity>=ERROR', 'action': 'notify("james")'}, {'condition': 'severity>=CRITICAL', 'action': 'notify("william")'}, {'condition': 'severity>=WARNING', 'action': 'notify("michael")'}, {'condition': 'severity>=EMERGENCY', 'action': 'notify("robert")'}, {'condition': 'severity>=EMERGENCY', 'action': 'notify("edward")'}, {'condition': 'severity>=ALERT', 'action': 'notify("brian")'}, {'condition': 'severity>=NOTICE', 'action': 'notify("kevin")'}])
See also Rules: Rule
| object | notification/rules/N/ |
| Event processing rule | |
Retrieving the value is denied if not administrative user
This object represents a value in persistent storage.
This object contains the following items:
| condition | Rule condition |
| action | Rule action |
Sample CLI read command (note that rule_index is a variable):
uom get "notification/rules/${rule_index}"
⇒
{"condition":"severity>=INFO","action":"notify(\"george\")"}
Sample curl deletion command (note that :rule_index is a URL template argument):
curl --digest -u admin:1234 -H "X-CSRF: x" -X DELETE -H "Accept: application/json" "http://192.168.0.100/restapi/notification/rules/:rule_index/"
| string | notification/rules/N/condition/ |
| Lua expression to evaluate for events to be matched | |
The value contains Lua source (has native MIME type text/x-lua).
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample requests read command (note that _rule_index is a variable):
print(requests.get('http://192.168.0.100/restapi/notification/rules/'+str(_rule_index)+'/condition/',auth=auth,headers=headers).json())
⇒
'severity>=CRITICAL'
Sample CLI write command (note that rule_index is a variable):
uom set "notification/rules/${rule_index}/condition" "\"severity>=CRITICAL\""
| string | notification/rules/N/action/ |
| Lua code to evaluate for matching events | |
The value contains Lua source (has native MIME type text/x-lua).
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample uom library write command (note that _rule_index is a variable):
uom.notification.rules[_rule_index].action="notify(\"paul\")"
Sample uom library read command (note that _rule_index is a variable):
print(uom.dump(uom.notification.rules[_rule_index].action))
⇒
"notify(\"kevin\")"
| map | notification/known_sink_types/ |
| Known sink types | |
Retrieving the value is denied if not administrative user
This map is composite, i.e. is modified as a whole.
This map does not support direct modification.
This map contains Sink type elements.
Creating elements in this collection is not supported.
Sample requests read command:
print(requests.get('http://192.168.0.100/restapi/notification/known_sink_types/',auth=auth,headers=headers).json())
⇒
<...>
Sample CLI read command:
uom get "notification/known_sink_types"
⇒
...
| object | notification/known_sink_types/S/ |
| Type of sink | |
Retrieving the value is denied if not administrative user
This object is a part of a composite value which is modified as a whole.
This object contains the following items:
| name | Name |
| data_items | Supported data items |
Sample requests read command (note that _sink_type is a variable):
print(requests.get('http://192.168.0.100/restapi/notification/known_sink_types/'+_sink_type+'/',auth=auth,headers=headers).json())
⇒
Sample requests write command (note that _sink_type is a variable):
requests.put('http://192.168.0.100/restapi/notification/known_sink_types/'+_sink_type+'/',auth=auth,headers=headers,json={'name': 'SNMP v3 trap', 'data_items': {'context_name': {'regexp': '^.*$', 'name': 'Context name', 'group': 'msg'}, 'context_engine_id': {'group': 'msg', 'name': 'Context engine ID', 'regexp': '^([0-9A-Fa-f][0-9A-Fa-f])*$'}, 'auth_protocol': {'group': 'msg', 'name': 'Authentication protocol', 'regexp': '^(|MD5|SHA)$'}, 'priv_protocol': {'group': 'msg', 'name': 'Privacy protocol', 'regexp': '^(|DES|AES)$'}, 'priv_passphrase': {'group': 'msgkey', 'name': 'Privacy passphrase', 'regexp': '^(|.{8,})$'}, 'security_name': {'regexp': '^.*$', 'name': 'Security name', 'group': 'msg'}, 'auth_passphrase': {'group': 'msgkey', 'name': 'Authentication passphrase', 'regexp': '^(|.{8,})$'}, 'trap_oid': {'group': 'msg', 'name': 'Default trap OID', 'regexp': '^[012](\\.[0-9]{1,}),{1,}$'}, 'security_engine_id': {'group': 'msg', 'name': 'Security engine ID', 'regexp': '^([0-9A-Fa-f][0-9A-Fa-f])*$'}, 'server': {'group': 'rcpt', 'name': 'Server address', 'regexp': '^[0-9A-Za-z.-]{1,}$'}}})
See also Sink type: Name
See also Sink type: Supported data items
| string | notification/known_sink_types/S/name/ |
| Sink type name | |
Retrieving the value is denied if not administrative user
This string is a part of a composite value which is modified as a whole.
This string does not support direct modification.
Sample curl read command (note that :sink_type is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/notification/known_sink_types/:sink_type/name/"
⇒
"SNMP v1 trap"
Sample uom library read command (note that _sink_type is a variable):
print(uom.dump(uom.notification.known_sink_types[_sink_type].name))
⇒
"SNMP v1 trap"
| map | notification/known_sink_types/S/data_items/ |
| Properties of supported data items | |
Retrieving the value is denied if not administrative user
This map is a part of a composite value which is modified as a whole.
This map does not support direct modification.
This map contains Data item properties elements.
Creating elements in this collection is not supported.
Sample JS request read command (note that _sink_type is a variable):
request.get({url:"notification/known_sink_types/"+_sink_type+"/data_items/"},function(error,response,body) {console.log(body)});
⇒
Sample curl read command (note that :sink_type is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/notification/known_sink_types/:sink_type/data_items/"
⇒
| object | notification/known_sink_types/S/data_items/S/ |
| Properties of data item | |
This object is a part of a composite value which is modified as a whole.
This object contains the following items:
| name | Name |
| group | Data item group |
| regexp | Regular expression |
Sample CLI write command (note that sink_type and data_item_properties are variables):
uom set "notification/known_sink_types/${sink_type}/data_items/${data_item_properties}" "{\"group\":\"rcpt\",\"name\":\"Recipient email address\",\"regexp\":\"^..*@[0-9A-Za-z.-]{1,}$\"}"
Sample JS request write command (note that _sink_type and _data_item_properties are variables):
request.put({url:"notification/known_sink_types/"+_sink_type+"/data_items/"+_data_item_properties+"/",body:{"group":"rcpt","name":"Recipient subnets","regexp":"^(|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(/([0-9]|1[0-9]|2[0-9]|3[0-2]))?(,(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(/([0-9]|1[0-9]|2[0-9]|3[0-2]))?)*)$"}});
| string | notification/known_sink_types/S/data_items/S/name/ |
| Data item name | |
Retrieving the value is denied if not administrative user
This string is a part of a composite value which is modified as a whole.
This string does not support direct modification.
Sample JS request read command (note that _sink_type and _data_item_properties are variables):
request.get({url:"notification/known_sink_types/"+_sink_type+"/data_items/"+_data_item_properties+"/name/"},function(error,response,body) {console.log(body)});
⇒
"Recipient URL"
Sample requests read command (note that _sink_type and _data_item_properties are variables):
print(requests.get('http://192.168.0.100/restapi/notification/known_sink_types/'+_sink_type+'/data_items/'+_data_item_properties+'/name/',auth=auth,headers=headers).json())
⇒
'Recipient URL'
| string | notification/known_sink_types/S/data_items/S/group/ |
| The group of data items to which this one belongs | |
The value is subject to the following constraints: sink data item groups[the value]
Retrieving the value is denied if not administrative user
This string is a part of a composite value which is modified as a whole.
This string does not support direct modification.
Sample JS request read command (note that _sink_type and _data_item_properties are variables):
request.get({url:"notification/known_sink_types/"+_sink_type+"/data_items/"+_data_item_properties+"/group/"},function(error,response,body) {console.log(body)});
⇒
"msgkey"
Sample uom library read command (note that _sink_type and _data_item_properties are variables):
print(uom.dump(uom.notification.known_sink_types[_sink_type].data_items[_data_item_properties].group))
⇒
"sndrkey"
| string | notification/known_sink_types/S/data_items/S/regexp/ |
| Regular expression which the data item must match | |
Retrieving the value is denied if not administrative user
This string is a part of a composite value which is modified as a whole.
This string does not support direct modification.
Sample CLI read command (note that sink_type and data_item_properties are variables):
uom get "notification/known_sink_types/${sink_type}/data_items/${data_item_properties}/regexp"
⇒
"^([0-9A-Fa-f][0-9A-Fa-f])*$"
Sample JS request read command (note that _sink_type and _data_item_properties are variables):
request.get({url:"notification/known_sink_types/"+_sink_type+"/data_items/"+_data_item_properties+"/regexp/"},function(error,response,body) {console.log(body)});
⇒
"^(|.{8,})$"
| map | notification/sink_data_item_groups/ |
| Properties of groups of sink data items | |
Retrieving the value is denied if not administrative user
This map is composite, i.e. is modified as a whole.
This map does not support direct modification.
This map can change as if by itself or indirectly because of other actions.
Changes to this map cannot be tracked.
This map contains Sink data item group elements.
Creating elements in this collection is not supported.
Sample uom library read command:
print(uom.dump(uom.notification.sink_data_item_groups))
⇒
Sample JS request read command:
request.get({url:"notification/sink_data_item_groups/"},function(error,response,body) {console.log(body)});
⇒
See also Sink data item groups: Sink data item group
| object | notification/sink_data_item_groups/S/ |
| Properties of a group of sink data items | |
Retrieving the value is denied if not administrative user
This object is a part of a composite value which is modified as a whole.
This object contains the following items:
| name | Name |
| secret | Secret |
| immutable | Immutable |
| unreadable | Unreadable |
Sample uom library read command (note that _sink_data_item_group is a variable):
print(uom.dump(uom.notification.sink_data_item_groups[_sink_data_item_group]))
⇒
{immutable=false,name="Message key",secret=true,unreadable=false}
Sample JS request read command (note that _sink_data_item_group is a variable):
request.get({url:"notification/sink_data_item_groups/"+_sink_data_item_group+"/"},function(error,response,body) {console.log(body)});
⇒
{"immutable":false,"unreadable":false,"name":"Recipient attribute","secret":false}
| string | notification/sink_data_item_groups/S/name/ |
| Data item group name | |
Retrieving the value is denied if not administrative user
This string is a part of a composite value which is modified as a whole.
This string does not support direct modification.
Sample uom library read command (note that _sink_data_item_group is a variable):
print(uom.dump(uom.notification.sink_data_item_groups[_sink_data_item_group].name))
⇒
"Message attribute"
Sample requests read command (note that _sink_data_item_group is a variable):
print(requests.get('http://192.168.0.100/restapi/notification/sink_data_item_groups/'+_sink_data_item_group+'/name/',auth=auth,headers=headers).json())
⇒
'Recipient attribute'
| sum (boolean) | notification/sink_data_item_groups/S/secret/ |
| Flag indicating whether the data item can contain private information | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| constant true | Secret | The data item can contain private information | |
| constant false | Not secret | The data item contains only public information | |
Sample CLI read command (note that sink_data_item_group is a variable):
uom get "notification/sink_data_item_groups/${sink_data_item_group}/secret"
⇒
true
Sample JS request read command (note that _sink_data_item_group is a variable):
request.get({url:"notification/sink_data_item_groups/"+_sink_data_item_group+"/secret/"},function(error,response,body) {console.log(body)});
⇒
true
| sum (boolean) | notification/sink_data_item_groups/S/immutable/ |
| Flag indicating whether the data item is not permitted to be changed | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| constant true | Immutable | The data item is not permitted to be changed | |
| constant false | Not immutable | The data item can be changed | |
Sample CLI read command (note that sink_data_item_group is a variable):
uom get "notification/sink_data_item_groups/${sink_data_item_group}/immutable"
⇒
false
Sample requests read command (note that _sink_data_item_group is a variable):
print(requests.get('http://192.168.0.100/restapi/notification/sink_data_item_groups/'+_sink_data_item_group+'/immutable/',auth=auth,headers=headers).json())
⇒
False
| sum (boolean) | notification/sink_data_item_groups/S/unreadable/ |
| Flag indicating whether the data item is not permitted to be read | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| constant true | Unreadable | The data item is not permitted to be read | |
| constant false | Not unreadable | The data item can be read | |
Sample requests read command (note that _sink_data_item_group is a variable):
print(requests.get('http://192.168.0.100/restapi/notification/sink_data_item_groups/'+_sink_data_item_group+'/unreadable/',auth=auth,headers=headers).json())
⇒
False
Sample curl read command (note that :sink_data_item_group is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/notification/sink_data_item_groups/:sink_data_item_group/unreadable/"
⇒
false