command/get

Gets information about the command.

Request Message

Authorization

Access JSON Web Token (GetDeviceCommand)

Message Representation

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

Message Parameters

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

Server Message

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

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