List of scenes by rest api

Hi there,

how do i get the list of available scenes by the rest api?

i want do create my little client that simply allows the user to activate a configured scene.
But the rest api services/scene only allows creation, modification, activation and refresh.

Wouldn’t it be easy to add a list-method? Or is it already be possible to access existing scenes by the api?

The Rest API includes a /states endpoint, that will return all states for all entities. So, e.g.

curl -X GET -H "Authorization: Bearer LONG-LIVED_ACCESS_TOKEN"   -H "Content-Type: application/json" http://my-hass-url/api/states

returns all of the entities (including scenes, scripts, automations, lights, switches, media_players, etc.)
From there your client justs need to filter for scene entities and act accordingly.

That is exactly what i was looking for
Thank you

Same question - How do I obtain the all the info from a state such that I could make follow up API calls to set that state? The call you mention just returns related entities - not their desired state.

Have you looked at the REST API page yet? It is fairly comprehensive and explains how to do what you need. If you have already and it doesn’t answer your question, let us know more specifically what you’re trying to accomplish (with code if at all possible).

http://192.168.x.x:8123/api/states/<scene.master_off>

Need to authorise the above REST Api with this token Dzca0UFcPZ1SCih9dL1zPx2PtKUCpLaUyNyeZW7ko1Y in the above web url format.

Possible to send the token with the above URL in a single command, what would be the syntax of this command need to execute this command on the browser.

I have ten such commands, need to execute them from a single click on the browser.