Feature Request | Discovery Endpoint
NyasakiAT opened this issue · comments
Would be nice to be able to call a endpoint like /devices
to get all devices and their type.
So curl -i -X GET -H 'Authorization: Bearer <your session ID>' 'http://localhost:8000/devices'
would return the following
{
"name": "Bulb1",
"device_type": "L630"
},
{
"name": "Bulb2",
"device_type": "L630"
},
{
"name": "Bulb3",
"device_type": "L630"
}
This would add support for automatic discovery of devices so whatever consumes the API knows what devices are avaliable and their device type so they know how to address them
Hi, thanks for your feedback!
I've created a route you can hit on /discovery
, which will return a list of all connected devices along with their type.
Note that this route will always require to be authenticated.
Tell me if the route suits your needs :)
Hey,
you named it discover
32e2480#diff-1b33b1af1a8e35c4f324cac560774fc81865de0181472f33fd544f199e8cf931R52
But yes that works as expected
Thanks a lot :)