Welcome to Headwind MDM Q&A, where you can ask questions and receive answers from other members of the community.

Please do not post bug reports, missing feature requests, or demo inquiries. If you have such an inquiry, submit a contact form.

0 votes
I want to retrieve the online/offline status of endpoint by code. I did a little research and there seems no API to do so. I would like suggestions on how I can achieve it efficiently. For example, if there is a database table of that information.
ago by (41.6k points)

1 Answer

0 votes

There is a REST method:

GET /rest/private/devices/number/{number}

which returns the device information by its number. 

It includes the timestamp (in milliseconds) when a device was online, so you can determine the online / offline status from this timestamp. 

In Headwind MDM, the device is considered online when it was connected less than 1 hour ago. The yellow status (offline warning) is when it came online 1-4 hours ago. Otherwise, the device is considered offline.

The full output format can be found here.

Alternatively, you can reach the device online time directly in the database (the devices table). The field name is lastUpdate (timestamp in milliseconds).

ago by (41.6k points)
...