Skip to content

REST API: Logs

View as Markdown

Generated from the daemon’s OpenAPI document. Conventions, sign-in, the CSRF header and the WebSocket are on API.

Stores log entries a core app wrote through the SDK for the signed-in user, as source app/; only for a core app the user may open (auth.permission.denied otherwise; third-party apps write through /api/app/logs). Debug entries are left out. At most 100 entries per request; each app may write bursts of 200 and then 20 entries a second, the rest is dropped and counted.

Parameters

Name In Type Required Description
app path string yes

Request body: application/json: AppLogBatch

Responses

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

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

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.

Administrators only. Every source with entries in the current logs or the archive: daemon, system/, app/.

Responses

  • 200: application/json: string[]

Any failure answers with problem details (application/problem+json) and a stable code from the error reference.