device/save
Registers or updates a device.
Authorization
Access JSON Web Token (RegisterDevice)
Request Topic and Payload
Topic
dh/request
Payload Representation
{
"action": {string},
"requestId": {object},
"deviceId": {string},
"device": {
"name": {string},
"data": {object},
"networkId": {integer},
"isBlocked": {boolean}
}
}
Payload Parameters
Property Name | Required | Type | Description |
---|---|---|---|
action | Yes | string | Action name: device/save |
requestId | No | object | Request unique identifier, will be passed back in the response message. |
deviceId | Yes | string | Device unique identifier. May contain only letters, digits and dashes. |
device | Yes | object | A Device resource to register or update. |
device.name | Yes | string | Device display name. |
device.data | No | object | Device data, a JSON object with an arbitrary structure. |
device.networkId | Yes | integer | Associated network id. |
device.isBlocked | No | boolean | Indicates whether device is blocked. |
Response Topic and Payload
Topic
dh/response/device/save@{clientId}
Payload Representation
{
"action": {string},
"status": {string},
"requestId": {object}
}
Payload Parameters
Property Name | Type | Description |
---|---|---|
action | string | Action name: device/save |
status | string | Operation execution status (success or error). |
requestId | object | Request unique identifier as specified in the request message. |
Updated almost 7 years ago