command/get

Gets information about the command.

Authorization

Access JSON Web Token (GetDeviceCommand)

Request Topic and Payload

Topic

dh/request

Payload Representation

{
    "action": {string},
    "requestId": {object},
    "deviceId": {string},
    "commandId": {long}
}

Payload Parameters

Property NameRequiredTypeDescripton
actionYesstringAction name: command/get
requestIdNoobjectRequest unique identifier, will be passed back in the response message.
deviceIdYesYesDevice unique identifier.
commandIdYesYesCommand unique identifier.

Response Topic and Payload

Topic

dh/response/command/get@{clientId}

Payload Representation

{
    "action": {string},
    "status": {string},
    "requestId": {object},
    "command": {
        "id": {long},
        "command": {string},
        "timestamp": {datetime},
        "lastUpdated": {datetime},
        "userId": {integer},
        "deviceId": {string},
        "networkId": {integer},
        "parameters": {object},
        "lifetime": {integer},
        "status": {string},
        "result": {object}
    }
}

Payload Parameters

Property NameTypeDescription
actionstringAction name: command/get
statusstringOperation execution status (success or error).
requestIdobjectRequest unique identifier as specified in the request message.
commandobjectAn inserted DeviceCommand resource.
command.idlongCommand identifier.
command.commandstringCommand name.
command.timestampdatetimeCommand UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).
command.lastUpdateddatetimeLast command update UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601).
command.userIdintegerAssociated user identifier.
command.deviceIdstringAssociated device identifier.
command.networkIdintegerAssociated network identifier.
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.