Smarthings API v1 several questions

Hi All

I’ve been using the Smarthings API in earnest but a couple of things I can’t figure out:

  1. Is it only possible to bring back one device [full] status at a time - it is very call intensive when the JSON doc could bring back all devices ?

  2. Where is the historical log data for each device event on the API - I cannot see an end point to get this data for a device ?

  3. Seemingly the device Health is not being captured into the API endpoint. While you can see it on the portal it does not come through on the JSON document populated.

Thanks !

I’ll defer to those who are better informed, but:

  1. I believe that is correct, or at least that is all that is documented. I guess how intensive you perceive it to be rather depends on which end of the call(s) you are.
  2. https://api.smartthings.com/history/devices?locationId=LOCATIONID&deviceId=DEVICEID is what I use. As it isn’t conventionally documented it has to be regarded as prone to change.
  3. https://api.smartthings.com/devices/DEVICEID/health works for me.
4 Likes

Thanks orangebucket - this is awesome. Works a treat.