Remove refrences to /api/discovery_info (#1054)

This commit is contained in:
Joakim Sørensen 2021-09-11 20:39:25 +02:00 committed by GitHub
parent fffc4910ab
commit 4bbf81ef73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 23 deletions

View File

@ -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`.

View File

@ -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.