command/list

Gets the list of commands.

Authorization

Access JSON Web Token (GetDeviceCommand)

Request Topic and Payload

Topic

dh/request

Payload Representation

{
    "action": {string},
    "requestId": {object},
    "deviceId": {string},
    "start": {datetime},
    "end": {datetime},
    "command": {string},
    "status": {string},
    "sortField": {string},
    "sortOrder": {string},
    "take": {integer},
    "skip": {integer}
}

Payload Parameters

Property NameRequiredTypeDescription
actionYesstringAction name: command/list
requestIdNoobjectRequest unique identifier, will be passed back in the response message.
deviceIdYesstringDevice unique identifier.
startNodatetimeStart UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601) to filter commands.
endNodatetimeEnd UTC datetime (yyyy-MM-dd'T'HH:mm:ss.SSS ISO 8601) to filter commands.
commandNostringFilter by command name.
statusNostringFilter by command status.
sortFieldNostringResult list sort field.
sortOrderNostringResult list sort order. Available values are ASC and DESC. The sortField should be specified.
takeNointegerNumber of records to take from the result list. If not specified 100 records will be taken.
skipNointegerNumber of records to skip from the result list. If not specified 0 records will be skipped.

Response Topic and Payload

Topic

dh/response/command/list@{clientId}

Payload Representation

{
    "action": {string},
    "requestId": {object},
    "status": {string},
    "commands": [{
        "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/list
requestIdobjectRequest unique identifier as specified in the request message.
statusstringOperation execution status (success or error).
commandsarrayThe array of commands.
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.