Rest api? #3802
-
|
Hello I am really enjoying music assistant, I am interested in integrating it with my own code since I am not a home assistant user. I found https://github.com/music-assistant/client but nothing in the documentation about it, is there some reference for the server api that i could use? I am looking for something like a REST or websocket api Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
|
We don’t publish full details about the api. What are you wanting to do? |
Beta Was this translation helpful? Give feedback.
-
@JarbasAl even if you are not using Home Assistant yourself it might still be a good idea to look at its integration code for Music Assistant? That it, suggest you also look at the The Maybe also look into how it is integrated into home-assistant's frontend as well (though think it's deeply embedded with the backend core?)? |
Beta Was this translation helpful? Give feedback.
-
@JarbasAl might it also be a good idea to partially study documentation for the general/generic Home Assistant WebSocket API integration as indirect reference since there at least looks to be plenty of documentation for that and can maybe assume that Music Assistant's approach is similar, or? |
Beta Was this translation helpful? Give feedback.
-
|
There is now API documentation for the 2.7.0 beta and later versions of Music Assistant. The API documentation is automatically generated and available at http://your_ma_server_ip:8095/api-docs |
Beta Was this translation helpful? Give feedback.
MA uses a websockets API which is also partially exposed as json/rest API.
Look at the client library for reference: https://github.com/music-assistant/client
or if you prefer javascript/typescript, see the frontend code: https://github.com/music-assistant/frontend/blob/main/src/plugins/api/index.ts
It's super straight forward so you should be able to figure it out quickly enough.
Unfortunately we do not have the capacity to write docs for the API now and we prefer if people use the official python client.