Device Data Type

Device is an object representing a device or gateway connected to the Everyware platform. The Device object contains several useful information on the connected object including its connection status and its profile information. Each devices is defined in the context of an Everyware Account whose ID is specified in the Device accountId attribute.

Upon connecting to the Everyware platform, each device will publish a birth certification announcing its characterinstics. The device profile attributes can be divided into few groups.
The device identifiers are attributes which uniquely identify the device. Those include: id, clientId, displayName, serialNumber, IMEI, IMSU, ICCID. The device displayName can be updated by the Account administrator.
The device connection information are attributes related to the device connection. Those include: status, lastEventOn, lastEventType, connectionIp, gpsLatitude, gpsLongitude.
The device version information are attributes related to the device model and version information. Those include: modelId, biosVersion, firmwareVersion, osVersion, jvmVersion, osgiFrameworkVersion, esfVersion, applicationIdentifiers.
The value of the device custom attributes 1-5 are set by the system administrator as additional string attributes that can be associated to the device.
All other device attributes are defined as device extended properties.
When loading or searching a device using the Everyware REST APIs, a fetch parameter can be used to control whether the device extended attributes should be loaded and returned.

Properties
name data type constraints description
accountId number required
id string  
clientId string max size: 255, min size: 0
status DeviceStatus  
connectionStatus DeviceConnectionStatus  
createdOn number  
createdBy number required
lastEventOn number  
lastEventType DeviceEventType  
displayName string max size: 255, min size: 0
serialNumber string max size: 255, min size: 0
imei string max size: 24, min size: 0
imsi string max size: 15, min size: 0
iccid string max size: 22, min size: 0
modelId string max size: 255, min size: 0
connectionIp string max size: 255, min size: 0
biosVersion string max size: 255, min size: 0
firmwareVersion string max size: 255, min size: 0
osVersion string max size: 255, min size: 0
jvmVersion string max size: 255, min size: 0
osgiFrameworkVersion string max size: 255, min size: 0
esfVersion string max size: 255, min size: 0
applicationIdentifiers string max size: 1024, min size: 0
acceptEncoding string max size: 255, min size: 0
gpsLatitude number  
gpsLongitude number  
customAttribute1 string max size: 255, min size: 0
customAttribute2 string max size: 255, min size: 0
customAttribute3 string max size: 255, min size: 0
customAttribute4 string max size: 255, min size: 0
customAttribute5 string max size: 255, min size: 0
optlock number required The optlock field is used to detect that this entity has not been modified by someone else. When updating an entity, first do a find to get the latest version of the entity and note the value of the optlock. Then in the update operation, set the optlock value to match the value that you found. If someone else has updated the entity between your find and update operations, the update will fail and the db/server will return an error.

See this stackoverflow question for more information on optimistic locking.

uptime number  
modelName string  
partNumber string  
availableProcessors string  
totalMemory string  
os string  
osArch string  
jvmName string  
jvmProfile string  
osgiFramework string  
connectionInterface string  
gpsAltitude number  
deviceUserId number required
accountName string  
signedCertificateId number  
mqttConnectionIp string max size: 255, min size: 0
credentialsTight DeviceCredentialsTight  
credentialsAllowChange boolean required
certificateCommonName string  
brokerClusterId number  

Example

{
  "accountId" : 12345,
  "id" : "...",
  "clientId" : "...",
  "status" : "ENABLED",
  "connectionStatus" : "DISCONNECTED",
  "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
}