Mistake on this page? Email us

Device event log

Device Management stores a log of all the important events in a device's lifetime, such as the device's first registration date and all firmware updates.

Please refer to the table of event log codes for more information on what these events mean.

You can see all device events in the Device Management Portal, or you can query the API.

Device events

Looking at one event:

  • The field event_type details a specific result code.
  • The field event_type_category details a result code category.
  • The field description details the event.
  • Each event includes device information in the data section.
  • The field event_type_description details a description of the result code.
    • In Device Management Portal, this corresponds to the Message type field in the Event log tab when you view a specific device.

There are five possible values for this field:

Value Description
SUCCESS The device reached the desired state.
FAIL The device did not reach the desired state.
SKIPPED The device is already at the desired state.
INFO Other information on the device, such as device state or lifecycle events.
UNDETERMINED This is a deprecated message. Replaced by INFO.

Seeing the event log using the APIs

To query the API:

curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events \
-H "Authorization: Bearer <api_key>"

Tip: You can limit your query to a specific device, or a group of devices, using device filters. The full list of query parameters is in the Device Directory API section.

When you query the API, the return for one event looks like:

{  
     "date_time":"2016-11-08T10:02:07.033000Z",
     "device_id":"00000000000000000000000000000000",
     "device_log_id":"00000000000000000000000000000000",
     "event_type":"1",
     "event_type_description":"FAIL",
     "event_type_category":"FAIL_SERVICE"
     "state_change":true,
     "description":"Device update failed",
     "changes":{
     },
     "data":{  
          "campaign_id":"00000000000000000000000000000000",
     }      
},

The full reply to this query has more than one event (remember that each event is marked by the date_time field):

{  
   "object":"list",
   "data":[
      {  
         "date_time":"2016-11-08T10:02:07.033000Z",
         "device_id":"00000000000000000000000000000000",
         "device_log_id":"00000000000000000000000000000000",
         "event_type":"1",
         "event_type_description":"FAIL",
         "event_type_category":"FAIL_SERVICE"
         "state_change":true,
         "description":"Device update failed",
         "changes":{
         },
         "data":{  
            "campaign_id":"00000000000000000000000000000000",
         }
      },
      {  
         "date_time":"2016-11-08T10:02:07.033000Z",
         "device_id":"00000000000000000000000000000000",
         "device_log_id":"00000000000000000000000000000001",
         "event_type":"1",
         "event_type_description":"FAIL",
         "event_type_category":"FAIL_NETWORK"
         "state_change":true,
         "description":"Manifest network error, nonspecific network error",
         "changes":{
         },
         "data":{  
            "campaign_id":"00000000000000000000000000000000",
         }
      }      
   ],
   "limit":50,
   "after":null,
   "order":"DESC",
   "has_more":true
}