notification/subscribe

Subscribes to device notifications. After subscription is completed, the server will start to send notification/insert messages to the connected user.

Request Message

Authorization

Access JSON Web Token (GetDeviceNotification)

Message Representation

{
    "action": {string},
    "requestId": {object},
    "timestamp": {datetime},
    "deviceId": {string},
    "networkIds": {array},
    "deviceTypeIds": {array},
    "names": {array}
}

Message Parameters

Property NameRequiredTypeDescription
actionYesstringAction name: notification/subscribe
requestIdNoobjectRequest unique identifier, will be passed back in the response message.
timestampNodatetimeUTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601) of the last received notification. If not specified, the server's timestamp is taken instead.
deviceIdNostringA unique device identifier to subscribe to. If not specified, the subscription is made to all accessible devices.
networkIdsNoarrayArray of network unique identifiers to subscribe to.
deviceTypeIdsNoarrayArray of device type unique identifiers to subscribe to.
namesNoarrayArray of notification names to subscribe to.

Response Message

Message Representation

{
    "action": {string},
    "status": {string},
    "requestId": {object},
    "subscriptionId": {integer}
}

Message Parameters

Property NameTypeDescription
actionstringAction name: notification/subscribe
statusstringOperation execution status (success or error).
requestIdobjectRequest unique identifier as specified in the request message.
subscriptionIdintegerA unique identifier of the subscription made.