Log API

Base path: /open/logs. Requires the logs scope.

Method Path Purpose
GET / List log directories
GET /detail Read a log chunk
DELETE / Delete a log file or directory
POST /download Download a log file

Read logs

Query parameters for GET /open/logs/detail:

Field Type Description
file string Required filename
path string Optional relative log directory
offset number Optional non-negative integer byte offset
limit number Optional positive integer, at most 1048576 bytes; default 262144
tail boolean Read the file tail when true; omitting offset also defaults to the tail

The response contains text in data, byte positions offset/nextOffset, total bytes in total, and truncated. An active instance adds logStatus: "running". Continue reading with nextOffset, not a character count.

ql log get --query '{"path":"demo","file":"example.log","offset":0,"limit":262144}' --json

Delete and download

Both request bodies use filename (not the query field file) and path; deletion also accepts optional type. Paths must remain inside the panel log directory. Restricted paths return API code 403.

{"filename":"example.log","path":"demo"}
ql log download --data '{"filename":"example.log","path":"demo"}' --output ./example.log --json

Downloads return file streams. The retired GET /open/logs/:file endpoint returns API code 410; use /detail.