Wiki

Clone wiki

Numera.LibrisAPI / device.reset

Home > API Reference Documentation > device.reset

device.reset

The device.reset action is used to reset a device (remove all of its device settings) and create a new event collector so the device has a fresh event history and can be distributed to a new user. Users must be AGENT_SUPERVISOR or above to execute this command. When invoked, this will create a Status event with a subtype of DeviceReset for the device which will be published.

Input Parameters

PropertyRequiredDescription
imeiyesThe imei of the device you want to reset
realmnoIf you want to change the realm on the device, include a realm
keep_existing_collectornoSet to true if you do not want the event history to be cleared for the device (only the configuration)
include_mailboxnoSet to true if you want a mailbox message to be created for the device to read his reset configuration, by default this message is not created since it is assumed the device will be power cycled before sending out for re-deployment.
settingsnoAn array of setting objects you want to keep as part of the reset (otherwise everything is deleted), each setting needs the following structure:
  • name - Setting name
  • value - Setting value as a string, all values are strings

Output

The result object will contain the updated device information for you.

PropertyDescription
iddevice id
imeidevice imei
namedevice name is a string that can be set by the dealer or other customer and be treated as a custom identifier for the device, it has no other meaning in the platform
statusdevice status
realmdevice realm
has_keyset to true when a device has contacted the platform and received its secret key
config_statusstatus related to the device reading a config update from its mailbox when initiated from the partner config dashboard
last_classifytime of the last classify event
last_calibrationtime of the last calibration event
msisdnif active, the caller id of the device
iccidSIM id inside of the Libris unit
network_operatornetwork operator (ATT_EOD,ATT_RETAIL)
event_collector_idformally known as patient id, represents the id that points to the current event log for the device
settingscurrent configuration settings from the system, realms, and device as an array of these objects:
  • name - Setting name
  • value - Setting value
  • source - Will tell you where the setting comes from, SYSTEM, DEVICE, or the name of the realm
mailbox_messagesan array of mailbox messages that may be sitting in the device's mailbox waiting to be read:
  • topic - message type
  • body - body of the message
  • status - status
  • created - when it was created
  • alerted - when device was notified
  • read - when it was read
ota_log_messagesif available, a large string showing the log of the current OTA attempt for the device
communications_healthan object with the following properties, depicting how recently the device has communicated with the platform:
  • communication_with_network - how recently it contacted the platform
  • location_health - how recently it reported a location
  • charging_health - how recently it reported battery information and charge
registered_with_location_serviceswhether the device has been registered with network location services (depends on network carrier what this means)

Possible Status Codes

Status CodeReasonDescription
1000NO_IMEIYou have to send in the imei
1001DEVICE_DOES_NOT_EXISTThe imei you supplied either does not exist or the user does not have permissions to use it
1002REALM_CHANGE_NOT_ALLOWEDYou are trying to change the realm, and the user does not have permissions to do that for this realm

Updated