cbrx_notifications
The API supports sending of notifications for certain events. Notification packets are the same as other JSON-RPC Response objects, except that they do not have an "id" field.
Note: Notifications are only sent to active socket connections that have requested them. Closing a socket and opening another one will mean you need to re-request notifications. See the Quick start for examples
Syntax: see API Call Structure
{ "method": "cbrx_notifications", "params": ["notification"], } |
notification is from the array of strings to shown when sending cbrx_apidetails a full list of possible notifications can be found in the section API Notifications
Returns:
{ "result": true } |
Errors
If there is an error in the API method then a JSON-RPC Error Object will be returned.
Examples
Example JSON-RPC request:
{
"jsonrpc": "2.0",
"id": 0,
"method": "cbrx_notifications",
"params": [
"usb-device-attached"
]
}
Example successful response:
{
"jsonrpc": "2.0",
"id": 0,
"result": true
}