Skip to main content
GET
Get Server Logs
Retrrieves the most recent lines from the server’s console log file.

Authentication

Requires the Wings authentication token in the Authorization header:

Path Parameters

string
required
The UUID of the server

Query Parameters

integer
default:100
Number of lines to retrieve from the log file. Minimum: 1, Maximum: 100. Values outside this range are clamped to the limits.

Response

array
Array of log line strings from the server’s console output. Lines are returned in chronological order (oldest first).

Error Responses

The requested server does not exist on this Wings instance.
An error occurred while reading the log file.

Behavior

  • Reads from the server’s persistent log file
  • Returns the last N lines from the file (where N is the size parameter)
  • Log lines are returned as raw strings
  • If the log file has fewer lines than requested, all available lines are returned
  • Size parameter is automatically clamped between 1 and 100

Example Requests

Get Last 100 Lines (Default)

Get Last 50 Lines

Example Response

Notes

  • This endpoint reads from a persistent log file, not live output
  • For real-time log streaming, use the websocket connection
  • Log files are rotated/cleared on server restart (depending on configuration)
  • The maximum retrievable lines is capped at 100 for performance reasons
  • Empty log files return an empty array
  • This is useful for viewing recent server output without establishing a websocket connection

Source Reference

Implemented in router/router_server.go:26 and server/server.go:252