devicesResult element

Type: devicesResult
Namespace: http://eurotech.com/edc/2.0
XML Schema: edc.xsd

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()):

Example XML

<?xml version="1.0" encoding="UTF-8"?> <devicesResult xmlns="http://eurotech.com/edc/2.0"> <limitExceeded>...</limitExceeded> <device> <accountId>...</accountId> <id>...</id> <clientId>...</clientId> <status>...</status> <connectionStatus>...</connectionStatus> <createdOn>...</createdOn> <createdBy>...</createdBy> <lastEventOn>...</lastEventOn> <lastEventType>...</lastEventType> <displayName>...</displayName> <serialNumber>...</serialNumber> <imei>...</imei> <imsi>...</imsi> <iccid>...</iccid> <modelId>...</modelId> <connectionIp>...</connectionIp> <biosVersion>...</biosVersion> <firmwareVersion>...</firmwareVersion> <osVersion>...</osVersion> <jvmVersion>...</jvmVersion> <osgiFrameworkVersion>...</osgiFrameworkVersion> <esfVersion>...</esfVersion> <applicationIdentifiers>...</applicationIdentifiers> <acceptEncoding>...</acceptEncoding> <gpsLatitude>...</gpsLatitude> <gpsLongitude>...</gpsLongitude> <customAttribute1>...</customAttribute1> <customAttribute2>...</customAttribute2> <customAttribute3>...</customAttribute3> <customAttribute4>...</customAttribute4> <customAttribute5>...</customAttribute5> <optlock>...</optlock> <properties>...</properties> <uptime>...</uptime> <modelName>...</modelName> <partNumber>...</partNumber> <availableProcessors>...</availableProcessors> <totalMemory>...</totalMemory> <os>...</os> <osArch>...</osArch> <jvmName>...</jvmName> <jvmProfile>...</jvmProfile> <osgiFramework>...</osgiFramework> <connectionInterface>...</connectionInterface> <gpsAltitude>...</gpsAltitude> <deviceUserId>...</deviceUserId> <accountName>...</accountName> <signedCertificateId>...</signedCertificateId> <mqttConnectionIp>...</mqttConnectionIp> <credentialsTight>...</credentialsTight> <credentialsAllowChange>...</credentialsAllowChange> <certificateCommonName>...</certificateCommonName> <brokerClusterId>...</brokerClusterId> </device> <device> <!--...--> </device> <!--...more "device" elements...--> </devicesResult>

Example JSON

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