REST-API: Logs
Erzeugt aus dem OpenAPI-Dokument des Daemons. Konventionen, Anmeldung, der CSRF-Header und der WebSocket stehen unter API.
POST /api/apps/{app}/logs
Abschnitt betitelt „POST /api/apps/{app}/logs“Stores log entries a core app wrote through the SDK for the signed-in user, as source app/
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
app |
path | string | ja |
Anfrage-Body: application/json: AppLogBatch
Antworten
- 200:
application/json: AppLogResult
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
GET /api/logs
Abschnitt betitelt „GET /api/logs“Administrators only. Log entries of the daemon, the system services and the apps, newest first, from the current logs and the archive together. Filters: time range (from, to), level (repeat for several: debug, info, warn, error), source (repeat for several), search (text in the message or its fields, or an exact request id). Pass nextCursor as cursor for older entries; limit is 1 to 1000 (default 200).
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
from |
query | string (date-time) | nein | |
to |
query | string (date-time) | nein | |
level |
query | string[] | nein | |
source |
query | string[] | nein | |
search |
query | string | nein | |
cursor |
query | string | nein | |
limit |
query | integer (int32) | nein |
Antworten
- 200:
application/json: LogPage
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
GET /api/logs/export
Abschnitt betitelt „GET /api/logs/export“Administrators only. Every entry matching the same filters as GET /api/logs, newest first, as a download: JSON lines, or text lines with format=text. At most 1,000,000 entries.
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
from |
query | string (date-time) | nein | |
to |
query | string (date-time) | nein | |
level |
query | string[] | nein | |
source |
query | string[] | nein | |
search |
query | string | nein | |
format |
query | string | nein |
Antworten
- 200
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
GET /api/logs/settings
Abschnitt betitelt „GET /api/logs/settings“Administrators only. The retention of the current logs and of the archive, with the space they take, their oldest entries and the pools that can hold the archive.
Antworten
- 200:
application/json: LogStatus
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
PUT /api/logs/settings
Abschnitt betitelt „PUT /api/logs/settings“Administrators only. Sets the retention. The current logs (system and apps together) stay below maxBytes, at most 4 GB; entries older than retentionDays go. The archive on a pool is optional; archivePool null means the first pool.
Anfrage-Body: application/json: LogSettings
Antworten
- 200:
application/json: LogStatus
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.
GET /api/logs/sources
Abschnitt betitelt „GET /api/logs/sources“Administrators only. Every source with entries in the current logs or the archive: daemon, system/
Antworten
- 200:
application/json: string[]
Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.