ambient-weather / api-docs

AmbientWeather.net API Documentation
64 stars 42 forks source link

Can the API return the ID used in the Public Dashboard Link? #40

Closed bachya closed 2 years ago

bachya commented 2 years ago

When you elect to share a dashboard publicly, you get a URL that looks like this:

https://ambientweather.net/dashboard/ID

It would really help the Home Assistant use case if that ID could somehow be returned via the API (REST or websocket). Ideally, there would also be some way to detect whether that ID was still publicly available or if it had been turned private again.

Thoughts? Doable?

owise1 commented 2 years ago

These are both technically possible using our unpublished api. A device's "sharable ID" is the mac address md5 hashed twice, so md5(md5(MAC ADDRESS)). You can test it's publicness using this url format: https://rt.ambientweather.net/devices?public.slug=SHARABLE ID. If the device is private you won't get any results

bachya commented 2 years ago

@owise1 Works great. Thank you!