Device Connectivity Made Easy

Focus on your product and innovation and leave communication and management to DeviceHive.

Get Started

DeviceNotification

Represents a device notification, a unit of information dispatched from devices.

Methods

Method

Authorization

Uri

Description

query

Access JSON Web Token (GetDeviceNotification)

GET /device/{deviceId}/notification

Queries device notifications.

get

Access JSON Web Token (GetDeviceNotification)

GET /device/{deviceId}/notification/{id}

Gets information about device notification.

insert

Access JSON Web Token (CreateDeviceNotification)

POST /device/{deviceId}/notification

Creates new device notification.

poll

Access JSON Web Token (GetDeviceNotification)

GET /device/{deviceId}/notification/poll

Polls new device notifications.
This method returns all device notifications that were created after specified timestamp.
In the case when no notifications were found, the method blocks until new notification is received. If no notifications are received within the waitTimeout period, the server returns an empty response. In this case, to continue polling, the client should repeat the call with the same timestamp value.

pollMany

Access JSON Web Token (GetDeviceNotification)

GET /device/notification/poll

Polls new device notifications.
This method returns all device notifications that were created after specified timestamp.
In the case when no notifications were found, the method blocks until new notification is received. If no notifications are received within the waitTimeout period, the server returns an empty response. In this case, to continue polling, the client should repeat the call with the same timestamp value.

Resource Representation

{
    "id": {integer},
    "notification": {string},
    "deviceId": {string},
    "networkId": {integer},
    "deviceTypeId": {integer},
    "timestamp": {datetime},
    "parameters": {object}
}

Property Name

Type

Description

id

integer

Notification identifier.

notification

string

Notification name.

deviceId

string

Device unique identifier.

networkId

integer

Network unique identifier.

deviceTypeId

integer

Device type unique identifier.

timestamp

datetime

Notification UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).

parameters

object

Notification parameters, a JSON object with an arbitrary structure.

Updated 3 years ago

DeviceNotification


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.