Status is not stored in the database. It indicates active network connection, so it doesn't make sense to persist it.
If it is not stored in the database, then where does the route: (/api/devices) get that status field from?
From the internal state in the server.
Is it stored just in memory? So it (device status) will be deleted on server reboot?
Yes, it doesn't make any sense to save it on reboot.
Is there no way to access these status by a third party app?
There is - through API.
The route for getting devices (/api/devices) returns a list of device which contains a status field (whether online or offline).
But the devices table only has these columns:
My question is, from what table do that route (/api/devices) fetches that status field?