device/save

Registers or updates a device.

Request Message

Authorization

Access JSON Web Token (RegisterDevice)

Message Representation

{
    "action": {string},
    "requestId": {object},
    "deviceId": {string},
    "device": {
        "name": {string},
        "data": {object},
        "networkId": {integer},
        "deviceTypeId": {integer},
        "isBlocked": {boolean}
    }
}

Message 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.deviceTypeId

No

integer

Associated device type id. Use default device type if it's not defined.

device.isBlocked

No

boolean

Indicates whether device is blocked.

Server Message

Message Representation

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

Message 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.