Make device appear online when using Rest API

It will return true if the device is online and false if the device is offline.