Document "Accept: text/x-log" in Supervisor host logs API (#2123)

This was added in https://github.com/home-assistant/supervisor/pull/4963
and available since Supervisor 2024.03.1.
This commit is contained in:
Jan Čermák 2024-04-25 10:46:14 +02:00 committed by GitHub
parent 717de66a3f
commit f409e414a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1557,9 +1557,9 @@ log record per line.
**HTTP Request Headers**
| Header | optional | description |
| -------- | -------- | ---------------------------------------------- |
| Accept | true | Type of data (currently only text/plain) |
| Header | optional | description |
| -------- | -------- |-------------------------------------------------------------------------------|
| Accept | true | Type of data (text/plain or text/x-log) |
| Range | true | Range of log entries. The format is `entries=cursor[[:num_skip]:num_entries]` |
:::tip
@ -1571,6 +1571,11 @@ as `num_skip`. E.g. `Range: entries=:-9:` returns the last 10 entries. Or
API returns the last 100 lines by default. Provide a value for `Range` to see
logs further in the past.
The `Accept` header can be set to `text/x-log` to get logs annotated with
extra information, such as the timestamp and Systemd unit name. If no
identifier is specified (i.e. for the host logs containing logs for multiple
identifiers/units), this option is ignored - these logs are always annotated.
</ApiEndpoint>
<ApiEndpoint path="/host/logs/follow" method="get">