broker: notification/insert

Notifies the user about new device notification.

Subscription Topic and Payload

Topic

dh/notification/{network-id}/{devicetype-id}/{device-id}/{notification-name}

Where:

  • network-id - DeviceHive Network ID
  • devicetype-id - DeviceHive DeviceType ID
  • device-id - DeviceHive Device ID
  • notification-name - Notification name

Payload Representation

{
    "action": {string},
    "subscriptionId": {guid},
    "notification": {
        "id": {integer},
        "notification": {string},
        "deviceId": {string},
        "timestamp": {datetime},
        "parameters": {object}
    }
}

Payload Parameters

Property NameTypeDescription
actionstringAction name: notification/insert
subscriptionIdguidIdentifier of the associated subscription.
notificationobjectA DeviceNotification resource representing the notification.
notification.idintegerNotification identifier.
notification.notificationstringNotification name.
notification.deviceIdstringDevice unique identifier.
notification.timestampdatetimeNotification timestamp (UTC).
notification.parametersobjectNotification parameters, a JSON object with an arbitrary structure.