I know how to get location ids and a list of all the devices using the API. However I’m looking for a way to get only devices for one location and not all locations. Does anyone know if this is possible? @nayelyz @orangebucket
The API endpoint of “devices” allows us to use some query parameters, to get the list of devices of a single location, you need to add something like this:
?locationId=xxx-xxx-xxx //result: https://api.smartthings.com/v1/devices/?locationId=xxx-xxx-xxx
You can also filter devices based on a capability ID:
A type, whose value is included in the device’s details:
In the API reference, you can see the available query parameters for each endpoint:
I also use browser debugging tools when accessing the API Browser+ from @TAustin to get the syntax used for various API calls he has implemented.
I knew it was going to be something simple. Thank you. @h0ckeysk8er @nayelyz