Skip to content
English

Get log file content

GET
/system/logs/{file}
curl --request GET \
--url 'https://example.com/api/v1/system/logs/example?n=10&skip=0' \
--cookie grommunioAuthJwt=<grommunioAuthJwt>

Returns the n last lines of the log file, similar to the tail command line tool

file
required
string

Name of the log file

n
integer
default: 10 >= 1

Number of lines to return

skip
integer
0

Number of lines to skip

after

Precise date/time string including fractional seconds

string
/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{1,6}$/

Return all lines after given time. Overrides n and skip.

List of log files returned

Media typeapplication/json
object
data
Array<object>

Log file entry

object
level

Priority level number as described in journalctl (1)

integer
message

Log message

string
time

Precise date/time string including fractional seconds

string
/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{1,6}$/
runtime

Time since last reboot

number
Examplegenerated
{
"data": [
{
"level": 1,
"message": "example",
"time": "example",
"runtime": 1
}
]
}

Validation of input parameters failed

Media typeapplication/json
object
message
string
errors

List of errors encountered during validation

Array<string>
Examplegenerated
{
"message": "example",
"errors": [
"example"
]
}

The requested resource could not be found

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

An error occurred while processing the request

Media typeapplication/json
object
message

String representation of the exception

string
Examplegenerated
{
"message": "example"
}