command/update

Updates an existing device command on behalf of device.

Authorization

Access JSON Web Token (UpdateDeviceCommand)

Request Topic and Payload

Topic

dh/request

Payload Representation

{
    "action": {string},
    "requestId": {object},
    "deviceId": {string},
    "commandId": {integer},
    "command": {
        "command": {string},
        "timestamp": {datatime},
        "parameters": {object},
        "lifetime": {integer},
        "status": {string},
        "result": {object}
    }
}

Payload Parameters

Property NameRequiredTypeDescription
actionYesstringAction name: command/update
requestIdNoobjectRequest unique identifier, will be passed back in the response message.
deviceIdYesstringDevice unique identifier.
commandIdYesintegerDevice command identifier.
commandYesobjectA DeviceCommand resource to update.
command.commandNostringCommand name.
command.timestampNodatetimeCommand UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).
command.parametersNoobjectCommand parameters, a JSON object with an arbitrary structure.
command.lifetimeNointegerCommand lifetime, a number of seconds until this command expires.
command.statusNostringCommand status, as reported by device or related infrastructure.
command.resultNoobjectCommand execution result, an optional value that could be provided by device.

Response Topic and Payload

Topic

dh/response/command/update@{clientId}

Payload Representation

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

Payload Parameters

Property NameTypeDescription
actionstringAction name: command/update
statusstringOperation execution status (success or error).
requestIdobjectRequest unique identifier as specified in the request message.