Might be more than one way to get it. But one option would be get device statuses filtering for everything except online status. Something like this.
https://api.meraki.com/api/v1/organizations/<your org ID>/devices/statuses?statuses[]=dormant&statuses[]=offline&statuses[]=alerting