Home > API Reference Documentation > device.update
device.update
The device.update
action is used to update a device. Only include the fields for information you actually want to update. Users must be AGENT_SUPERVISOR or above to execute this command (some fields can only be updated by SUPERUSER).
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. This will force a config message in the device's mailbox. |
name | no | If you want to change the name of the device, include this property ... it must be unique within the master realm the device belongs to |
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 |
1003 | VALIDATION_ERROR | Check the field property of the result object to see which property you sent failed validation |
1004 | DUPLICATE_NAME | A device within the same master realm already has the name you specified for the device |