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.
Property | Required | Description |
imei | yes | The imei of the device you want to reset |
realm | no | If you want to change the realm on the device, include a realm |
keep_existing_collector | no | Set to true if you do not want the event history to be cleared for the device (only the configuration) |
include_mailbox | no | Set 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. |
settings | no | An 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.
Property | Description |
id | device id |
imei | device imei |
name | device 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 |
status | device status |
realm | device realm |
has_key | set to true when a device has contacted the platform and received its secret key |
config_status | status related to the device reading a config update from its mailbox when initiated from the partner config dashboard |
last_classify | time of the last classify event |
last_calibration | time of the last calibration event |
msisdn | if active, the caller id of the device |
iccid | SIM id inside of the Libris unit |
network_operator | network operator (ATT_EOD,ATT_RETAIL) |
event_collector_id | formally known as patient id, represents the id that points to the current event log for the device |
settings | current 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_messages | an 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_messages | if available, a large string showing the log of the current OTA attempt for the device |
communications_health | an 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_services | whether the device has been registered with network location services (depends on network carrier what this means) |
Possible Status Codes
Status Code | Reason | Description |
1000 | NO_IMEI | You have to send in the imei |
1001 | DEVICE_DOES_NOT_EXIST | The imei you supplied either does not exist or the user does not have permissions to use it |
1002 | REALM_CHANGE_NOT_ALLOWED | You are trying to change the realm, and the user does not have permissions to do that for this realm |