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.
curl http://your-server:6767/
Responsetext/plain
=== PopLock Server Report ===
...

GET /api

Returns the endpoint index with service name and version.
curl http://your-server:6767/api
Response
{
  "ok": true,
  "service": "PopLock API",
  "version": "1.0.0",
  "endpoints": [
    { "method": "GET",  "route": "/",                    "auth_required": false },
    { "method": "GET",  "route": "/api/status",          "auth_required": false },
    { "method": "POST", "route": "/api/server/start",    "auth_required": true  }
  ]
}
ok
boolean
required
true on success.
service
string
required
Always "PopLock API".
version
string
required
API version string, e.g. "1.0.0".
endpoints
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.
curl http://your-server:6767/api/status
Response — server online
{
  "ok": true,
  "online": true,
  "pid": 12345,
  "uptime": "0:15:30",
  "memory": "12.3%",
  "version": "1.21.4-123"
}
Response — server offline
{
  "ok": true,
  "online": false
}
ok
boolean
required
true on success.
online
boolean
required
true if the server Java process is currently running.
pid
number
Process ID of the running server. Only present when online is true.
uptime
string
Elapsed time since process start in H:MM:SS format. Only present when online is true.
memory
string
Memory usage as a percentage of total system memory (e.g. "12.3%"). Only present when online is true.
version
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.
curl http://your-server:6767/api/players/online
Response
{
  "ok": true,
  "online": true,
  "count": 2,
  "players": ["PlayerOne", "PlayerTwo"]
}
ok
boolean
required
true on success.
online
boolean
required
true if the server process is running.
count
number
Number of players currently online. Only present when online is true.
players
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.
curl http://your-server:6767/api/players/whitelist
Response
{
  "ok": true,
  "count": 5,
  "whitelist": [
    { "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name": "PlayerOne" }
  ]
}
ok
boolean
required
true on success.
count
number
required
Total number of whitelisted players.
whitelist
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.
lines
number
default:"200"
Number of lines to return. Maximum is 2000. Defaults to 200 if omitted.
curl "http://your-server:6767/api/logs/latest?lines=100"
Response
{
  "ok": true,
  "file": "latest.log",
  "lines": [
    "[12:00:01] [Server thread/INFO]: Starting minecraft server version 1.21.4",
    "[12:00:05] [Server thread/INFO]: Done (3.412s)! For help, type \"help\""
  ]
}
ok
boolean
required
true on success.
file
string
required
Always "latest.log".
lines
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.
lines
number
default:"200"
Number of lines to return. Maximum is 2000. Defaults to 200 if omitted.
curl "http://your-server:6767/api/logs/snapshot?lines=50"
Response
{
  "ok": true,
  "file": "/var/log/minecraft_snapshot.log",
  "lines": [
    "[2024-01-15 23:00:01] Starting snapshot backup...",
    "[2024-01-15 23:00:12] Snapshot complete: snapshot_20240115_230012.tar.gz"
  ]
}
ok
boolean
required
true on success.
file
string
required
Always "/var/log/minecraft_snapshot.log".
lines
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.
curl http://your-server:6767/api/backups
Response
{
  "ok": true,
  "count": 7,
  "backups": [
    {
      "name": "snapshot_20240115_230012.tar.gz",
      "type": "snapshot",
      "size": "1.20 GB",
      "bytes": 1234567890,
      "created": "2024-01-15T23:00:12.000Z"
    }
  ]
}
Backup type is inferred from the filename prefix:
PrefixType
snapshot_snapshot
minecraft_backup_full_backup
restore_undorestore_undo
anything elsearchive
ok
boolean
required
true on success.
count
number
required
Total number of backup files found.
backups
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.
curl http://your-server:6767/api/properties
Response
{
  "ok": true,
  "properties": {
    "server-port": "25565",
    "max-players": "20",
    "level-name": "world",
    "difficulty": "normal"
  }
}
ok
boolean
required
true on success.
properties
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.
curl http://your-server:6767/api/report
Response
{
  "ok": true,
  "report": "=== PopLock Server Report ===\n..."
}
ok
boolean
required
true on success.
report
string
required
Full plain text output of servreport.sh, with newlines preserved.