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()):
http://eurotech.com/edc/2.0
name | data type | type | namespace | min/max occurs | constraints | description |
---|---|---|---|---|---|---|
device | list of device | element | edc | 0/unbounded | ||
limitExceeded | boolean | element | edc | 1/1 | required |
Example
<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> <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> </devicesResult>