Skip to main content
All GET routes are public. No API key is needed. Responses are JSON unless otherwise noted. Base URL: http://your-server:6767

GET /

Returns the plain text output of servreport.sh — the same human-readable report you would see by running the script on the server directly.
Responsetext/plain

GET /api

Returns the endpoint index with service name and version.
Response
boolean
required
true on success.
string
required
Always "PopLock API".
string
required
API version string, e.g. "1.0.0".
object[]
required
Array of all registered routes. Each entry includes method, route, and auth_required.

GET /api/status

Returns whether the Minecraft server process is running. When online, also returns the PID, uptime, memory usage, and version.
Response — server online
Response — server offline
boolean
required
true on success.
boolean
required
true if the server Java process is currently running.
number
Process ID of the running server. Only present when online is true.
string
Elapsed time since process start in H:MM:SS format. Only present when online is true.
string
Memory usage as a percentage of total system memory (e.g. "12.3%"). Only present when online is true.
string
Minecraft server version from version_history.json (e.g. "1.21.4-123"). Only present when online is true and the file is readable.

GET /api/players/online

Returns the list of players currently connected to the server. Player presence is determined by parsing join and leave events from latest.log.
If the server is offline, online is false and players is an empty array — no log parsing is attempted.
Response
boolean
required
true on success.
boolean
required
true if the server process is running.
number
Number of players currently online. Only present when online is true.
string[]
required
Array of online player names. Empty array when the server is offline.

GET /api/players/whitelist

Returns the full contents of whitelist.json as parsed JSON.
Response
boolean
required
true on success.
number
required
Total number of whitelisted players.
object[]
required
Array of whitelist entries, each with uuid and name fields, exactly as stored in whitelist.json.

GET /api/logs/latest

Returns the last N lines of latest.log.
number
default:"200"
Number of lines to return. Maximum is 2000. Defaults to 200 if omitted.
Response
boolean
required
true on success.
string
required
Always "latest.log".
string[]
required
Array of log lines, oldest first.

GET /api/logs/snapshot

Returns the last N lines of the snapshot cron log at /var/log/minecraft_snapshot.log.
number
default:"200"
Number of lines to return. Maximum is 2000. Defaults to 200 if omitted.
Response
boolean
required
true on success.
string
required
Always "/var/log/minecraft_snapshot.log".
string[]
required
Array of log lines, oldest first.

GET /api/backups

Lists all .tar.gz files in the backup directory, sorted by creation date with the newest first.
Response
Backup type is inferred from the filename prefix:
boolean
required
true on success.
number
required
Total number of backup files found.
object[]
required
Array of backup entries sorted newest first.

GET /api/properties

Returns the contents of server.properties parsed as a flat key/value object. Comment lines and blank lines are excluded.
Response
boolean
required
true on success.
object
required
All non-comment key/value pairs from server.properties. All values are strings.

GET /api/report

Returns the servreport.sh output as a JSON-wrapped string rather than plain text. Useful when you need to parse or forward the report programmatically.
Response
boolean
required
true on success.
string
required
Full plain text output of servreport.sh, with newlines preserved.