broker: command/insert

Notifies the user about new device command.

Subscription Topic and Payload




  • network-id - DeviceHive Network ID
  • devicetype-id - DeviceHive DeviceType ID
  • device-id - DeviceHive Device ID
  • command-name - Command name

Payload Representation

    "action": {string},
    "subscriptionId": {guid},
    "command": {
        "id": {integer},
        "timestamp": {datetime},
        "userId": {integer},
        "deviceId": {string},
        "command": {string},
        "parameters": {object},
        "lifetime": {integer},
        "status": {string},
        "result": {object}

Payload Parameters

Property NameTypeDescription
actionstringAction name: command/insert
subscriptionIdguidIdentifier of the associated subscription.
commandobjectA DeviceCommand resource representing the command.
command.idintegerCommand identifier.
command.timestampdatetimeCommand timestamp (UTC).
command.userIdintegerAssociated user identifier.
command.deviceIdstringDevice unique identifier.
command.commandstringCommand name.
command.parametersobjectCommand parameters, a JSON object with an arbitrary structure.
command.lifetimeintegerCommand lifetime, a number of seconds until this command expires.
command.statusstringCommand status, as reported by device or related infrastructure.
command.resultobjectCommand execution result, an optional value that could be provided by device.