DevicesResult Data Type

DevicesResult is a container for a list of Devices returned by a list device call. It contains the list of requested Devices and a flag signaling whether the limit for the maximum number of returned entities has been reached. If limitExceeded is set, the client is requested to paginate through the result by moving the offset forward and issue a new request to get more data.

Example to get all devices:

    String apiPath = "devices.xml";
    WebResource apisWeb = client.resource(API_URL).path(apiPath);

    DevicesResult result;
    int offset = 0;
    do {
       // if the "limit" queryParam is not initialized, limit default value = 50
       // if the "offset" queryParam is not initialized, offset default value = 0
       apisWeb = apisWeb.queryParam("limit", "" + limit);
       if (offset > 0)
          apisWeb = apisWeb.queryParam("offset", "" + offset);
       result = apisWeb.get(DevicesResult.class);
       offset += limit;
    } while (result.isLimitExceeded()):
 

Properties
name data type constraints description
limitExceeded boolean required
device array of Device  

Example

{
  "limitExceeded" : true,
  "device" : [ {
    "accountId" : 12345,
    "id" : "...",
    "clientId" : "...",
    "status" : "ENABLED",
    "connectionStatus" : "MISSING",
    "createdOn" : 12345,
    "createdBy" : 12345,
    "lastEventOn" : 12345,
    "lastEventType" : "DISCONNECTED",
    "displayName" : "...",
    "serialNumber" : "...",
    "imei" : "...",
    "imsi" : "...",
    "iccid" : "...",
    "modelId" : "...",
    "connectionIp" : "...",
    "biosVersion" : "...",
    "firmwareVersion" : "...",
    "osVersion" : "...",
    "jvmVersion" : "...",
    "osgiFrameworkVersion" : "...",
    "esfVersion" : "...",
    "applicationIdentifiers" : "...",
    "acceptEncoding" : "...",
    "gpsLatitude" : 12345.0,
    "gpsLongitude" : 12345.0,
    "customAttribute1" : "...",
    "customAttribute2" : "...",
    "customAttribute3" : "...",
    "customAttribute4" : "...",
    "customAttribute5" : "...",
    "optlock" : 12345,
    "uptime" : 12345,
    "modelName" : "...",
    "partNumber" : "...",
    "availableProcessors" : "...",
    "totalMemory" : "...",
    "os" : "...",
    "osArch" : "...",
    "jvmName" : "...",
    "jvmProfile" : "...",
    "osgiFramework" : "...",
    "connectionInterface" : "...",
    "gpsAltitude" : 12345.0,
    "deviceUserId" : 12345,
    "accountName" : "...",
    "signedCertificateId" : 12345,
    "mqttConnectionIp" : "...",
    "credentialsTight" : "LOOSE",
    "credentialsAllowChange" : true,
    "certificateCommonName" : "...",
    "brokerClusterId" : 12345
  }, {
    "accountId" : 12345,
    "id" : "...",
    "clientId" : "...",
    "status" : "ENABLED",
    "connectionStatus" : "CONNECTED",
    "createdOn" : 12345,
    "createdBy" : 12345,
    "lastEventOn" : 12345,
    "lastEventType" : "CONF_ROLLEDBACK",
    "displayName" : "...",
    "serialNumber" : "...",
    "imei" : "...",
    "imsi" : "...",
    "iccid" : "...",
    "modelId" : "...",
    "connectionIp" : "...",
    "biosVersion" : "...",
    "firmwareVersion" : "...",
    "osVersion" : "...",
    "jvmVersion" : "...",
    "osgiFrameworkVersion" : "...",
    "esfVersion" : "...",
    "applicationIdentifiers" : "...",
    "acceptEncoding" : "...",
    "gpsLatitude" : 12345.0,
    "gpsLongitude" : 12345.0,
    "customAttribute1" : "...",
    "customAttribute2" : "...",
    "customAttribute3" : "...",
    "customAttribute4" : "...",
    "customAttribute5" : "...",
    "optlock" : 12345,
    "uptime" : 12345,
    "modelName" : "...",
    "partNumber" : "...",
    "availableProcessors" : "...",
    "totalMemory" : "...",
    "os" : "...",
    "osArch" : "...",
    "jvmName" : "...",
    "jvmProfile" : "...",
    "osgiFramework" : "...",
    "connectionInterface" : "...",
    "gpsAltitude" : 12345.0,
    "deviceUserId" : 12345,
    "accountName" : "...",
    "signedCertificateId" : 12345,
    "mqttConnectionIp" : "...",
    "credentialsTight" : "INHERITED",
    "credentialsAllowChange" : true,
    "certificateCommonName" : "...",
    "brokerClusterId" : 12345
  } ]
}