REST API: Logs
Generated from the daemon’s OpenAPI document. Conventions, sign-in, the CSRF header and the WebSocket are on API.
POST /api/apps/{app}/logs
Section titled “POST /api/apps/{app}/logs”Stores log entries a core app wrote through the SDK for the signed-in user, as source app/
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
app |
path | string | yes |
Request body: application/json: AppLogBatch
Responses
- 200:
application/json: AppLogResult
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/logs
Section titled “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).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from |
query | string (date-time) | no | |
to |
query | string (date-time) | no | |
level |
query | string[] | no | |
source |
query | string[] | no | |
search |
query | string | no | |
cursor |
query | string | no | |
limit |
query | integer (int32) | no |
Responses
- 200:
application/json: LogPage
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/logs/export
Section titled “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.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from |
query | string (date-time) | no | |
to |
query | string (date-time) | no | |
level |
query | string[] | no | |
source |
query | string[] | no | |
search |
query | string | no | |
format |
query | string | no |
Responses
- 200
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/logs/settings
Section titled “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.
Responses
- 200:
application/json: LogStatus
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
PUT /api/logs/settings
Section titled “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.
Request body: application/json: LogSettings
Responses
- 200:
application/json: LogStatus
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/logs/sources
Section titled “GET /api/logs/sources”Administrators only. Every source with entries in the current logs or the archive: daemon, system/
Responses
- 200:
application/json: string[]
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.