How i get the power up/down (online/offline) notification / webhook

I have the 4 Node Switch and I just want to get a notification while the device has powered up (online) and the device goes offline. No the switch on/off notification.

Tell me anything about the Webhook or any API which I can hit every 1-2 secs and the status of the device.

You can achive this using API shared in this forum.

Use device state API and create alerts on status object. Staus 1 is online and 0 means offline.