How to get devices status via API

Hi, I’m relatively new to LibreNMS, Sorry if asking stupid question.

We have to integrate LibreNMS to external application and have to provide all devices statuses information to it: up/down/\warning
In list_devices API statuses like up and down are available. Any idea how to get list of devices with “warning” i.e. device rebooted in last 24 hours status?
In Availability map (http:///availability-map/) from time to time devices with Warning status occurs and have to present it as well

thank you in advance,
Gedas