mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-13 20:36:29 +00:00
Remove refrences to /api/discovery_info (#1054)
This commit is contained in:
parent
fffc4910ab
commit
4bbf81ef73
@ -17,7 +17,7 @@ Use `supervisor` for communication with the internal API.
|
||||
|
||||
An add-on can talk to the [Home Assistant Core API][core-api] using the internal proxy. This makes it very easy to communicate with the API without knowing the password, port or any other information about the Home Assistant instance. Using this URL: `http://supervisor/core/api` ensures that internal communication is redirected to the right place. The next step is to add `homeassistant_api: true` to the `config.json` file and read the environment variable `SUPERVISOR_TOKEN`. Use this as the Home Assistant Core [bearer token](/auth_api.md#making-authenticated-requests) when making requests.
|
||||
|
||||
For example `curl -X GET -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" -H "Content-Type: application/json" http://supervisor/core/api/discovery_info`
|
||||
For example `curl -X GET -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" -H "Content-Type: application/json" http://supervisor/core/api/config`
|
||||
|
||||
There is also a proxy for the [Home Assistant Websocket API][core-websocket] that works like the API proxy above and requires `SUPERVISOR_TOKEN` as the password. Use this URL: `http://supervisor/core/websocket`.
|
||||
|
||||
|
@ -134,28 +134,6 @@ curl -X GET -H "Authorization: Bearer ABCDEFGH" \
|
||||
|
||||
</ApiEndpoint>
|
||||
|
||||
<ApiEndpoint path="/api/discovery_info" method="get" unprotected>
|
||||
|
||||
Returns basic information about the Home Assistant instance as JSON.
|
||||
|
||||
```json
|
||||
{
|
||||
"base_url": "http://192.168.0.2:8123",
|
||||
"location_name": "Home",
|
||||
"requires_api_password": true,
|
||||
"version": "0.56.2"
|
||||
}
|
||||
```
|
||||
|
||||
Sample `curl` command:
|
||||
|
||||
```shell
|
||||
curl -X GET -H "Content-Type: application/json" \
|
||||
http://localhost:8123/api/discovery_info
|
||||
```
|
||||
|
||||
</ApiEndpoint>
|
||||
|
||||
<ApiEndpoint path="/api/events" method="get">
|
||||
|
||||
Returns an array of event objects. Each event object contains event name and listener count.
|
||||
|
Loading…
x
Reference in New Issue
Block a user