Help With API to get labels back for devices with batteries

api
variables

#1

1) Give a description of the problem
(PUT YOUR INFO HERE)
I use https://api.smartthings.com/v1/devices/?name=battery and it brings back everything. In the old app you could use https://api.smartthings.com/v1/devices/capabilities=battery and it would bring back devices that had a battery.

2) What is the expected behaviour?
(PUT YOUR INFO HERE)
bring back battery devices to put in a variable via the label name
3) What is happening/not happening?
(PUT YOUR INFO HERE)
no variable is being updated - just not sure I am getting any data back
4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Really? Looks like it should be more like https://api.smartthings.com/v1/devices?capability=battery though I can’t test it at the moment.


#3

That worked like a charm. Now I have to figure out how to get the response.items.label into a variable.

This is not working

image

Thank you.

Jared


#4

Now I am getting this error.