device/list

Gets the list of devices.

Authorization

Access JSON Web Token (GetDevice)

Request Topic and Payload

Topic

dh/request

Payload Representation

{
    "action": {string},
    "requestId": {object},
    "name": {string},
    "namePattern": {string},
    "networkId": {long},
    "networkName": {string},
    "sortField": {string},
    "sortOrder": {string},
    "take": {integer},
    "skip": {integer}
}

Payload Parameters

Property nameRequiredTypeDescription
actionYesstringAction name: device/list
requestIdNoobjectRequest unique identifier, will be passed back in the response message.
nameNostringFilter by device name.
namePatternNostringFilter by device name pattern. In pattern wildcards '%' and '_' can be used.
networkIdNolongFilter by associated network identifier.
networkNameNostringFilter by associated network name.
sortFieldNostringResult list sort field. Available values are name and network.
sortOrderNostringResult list sort order. Available values are ASC and DESC. The sortField should be specified.
takeNointegerNumber of records to take from the result list.
skipNointegerNumber of records to skip from the result list.

Response Topic and Payload

Topic

dh/response/device/list@{clientId}

Payload Representation

{
    "action": {string},
    "requestId": {object},
    "status": {string},
    "devices": [{
        "id": {string},
        "name": {string},
        "status": {string},
        "data": {object},
        "networkId": {integer},
        "isBlocked": {boolean},
    }]
}

Payload Parameters

Property NameTypeDescription
actionstringAction name: device/list
requestIdobjectRequest unique identifier as specified in the request message.
statusstringOperation execution status (success or error).
devicesarrayThe array of devices.
deviceobjectThe Device resource representing the user device.
device.idstringDevice unique identifier.
device.namestringDevice display name.
device.statusstringDevice operation status. The status is optional and it can be set to an arbitrary value, if applicable.
If device status monitoring feature is enabled, the framework will set status value to 'Offline' after defined period of inactivity.
device.dataobjectDevice data, a JSON object with an arbitrary structure.
device.networkIdintegerNetwork identifier.
device.isBlockedbooleanDevice isBlocked identifier.