Skip to content

API Server

Pavel Erokhin edited this page Oct 19, 2026 · 1 revision

The server as a whole: its version and load, the host, plugins, the console, and who may join. Every path starts with /api/v1.

Endpoint Permission What it does
GET /server server:read Server version, players, settings, and current load
POST /server/broadcast players:write Send a chat message, title, or action bar to everyone online
POST /server/commands server:console Run a console command and capture its output
GET /server/logs logs:read Recent console lines
GET /server/performance server:read TPS, tick times, memory, CPU, and load per world, with the most common entity types
GET /server/plugins server:read Installed plugins
POST /server/restart server:control Restart the server after a countdown in chat
GET /server/restart server:read Whether a restart or stop is pending, and when
DELETE /server/restart server:control Call off a pending restart or stop
POST /server/save server:control Save every world, and player data
POST /server/stop server:control Stop the server after a countdown in chat
GET /server/stop server:read Whether a restart or stop is pending, and when
DELETE /server/stop server:control Call off a pending restart or stop
GET /server/system system:read The host: CPU load, memory, swap, disk, container limits, open files, and the Java runtime

Access

Endpoint Permission What it does
GET /server/bans players:moderate Banned players and IP addresses
PATCH /server/bans players:moderate Ban or pardon players and IP addresses
GET /server/ops players:moderate Server operators
PATCH /server/ops players:moderate Make players operators or take it away
GET /server/whitelist players:moderate Whitelist state and players
PATCH /server/whitelist players:moderate Turn the whitelist on or off, add or remove players

Recipes

Endpoint Permission What it does
GET /recipes server:read Recipes that make an item, or use it

Notes

  • GET /server carries the current load next to the version and settings, so a status page needs one request: tps, tps5m, and tps15m (capped at 20), mspt, memoryUsedMb and memoryMaxMb for the Java heap, and loadedChunks and entities across every world. It also lists the datapacks, enabled or not.
  • GET /server/performance breaks the same numbers down by world and adds tick percentiles, CPU, the most common entity types, and jvm: heap and non-heap memory, each memory pool, garbage collection per collector, threads, loaded classes, and direct buffers.
  • GET /server/system describes the host: load averages, memory and swap, the disk under the server folder, cgroup limits in a container, open files, resident memory, and the Java runtime. Linux fills in more than other systems.
  • GET /server/logs returns recent console lines, filtered by level and grep. WorldAPI keeps them from its own start, up to limits.consoleLines, and blanks out its tokens. The server.console topic streams the same lines live; older logs are files under logs/ (see Files).
  • POST /server/restart counts down in chat, saves every world and player, and stops the server; DELETE calls it off. Something must start the server again: Docker's restart policy, or a start script that loops. POST /server/stop does the same with “stops” in the warnings.
  • The whitelist, operators, and bans go through the server, so it saves whitelist.json, ops.json, and the ban lists in its own format.

Next: Worlds and blocks.

Clone this wiki locally