Skip to content

Commit 9877758

Browse files
authored
Document query parameters for host logs APIs (home-assistant#2781)
1 parent 18d0f4c commit 9877758

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/api/supervisor/endpoints.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,23 @@ log record per line.
17471747
| Accept | true | Type of data (text/plain or text/x-log) |
17481748
| Range | true | Range of log entries. The format is `entries=cursor[[:num_skip]:num_entries]` |
17491749

1750+
**HTTP Query Parameters**
1751+
1752+
These are a convenience alternative to the headers shown above as query
1753+
parameters are easier to use in development and with the Home Assistant proxy.
1754+
You should only provide one or the other.
1755+
1756+
| Query | type | description |
1757+
| -------- | ----- |----------------------------------------------------------------------------------- |
1758+
| verbose | N/A | If included, uses `text/x-log` as log output type (alternative to `Accept` header) |
1759+
| lines | int | Number of lines of output to return (alternative to `Range` header) |
1760+
1761+
Example query string:
1762+
1763+
```text
1764+
?verbose&lines=100
1765+
```
1766+
17501767
:::tip
17511768
To get the last log entries the Range request header supports negative values
17521769
as `num_skip`. E.g. `Range: entries=:-9:` returns the last 10 entries. Or

0 commit comments

Comments
 (0)