Repository navigation
WorldAPI 3.0.0
WorldAPI 3.0 gives server owners an admin panel, configs and logs as files, and finer permissions. Read “Upgrading from 2.x” below before you update: the API changed in places.
- 🖥️ An admin panel at
/admin, served by WorldAPI itself: live load, JVM and host numbers, the console streaming live with a command line, chat, players with their inventories and deaths, files with an editor, plugins, tokens, accounts, and the audit log. Run/worldapi adminin game for a code, then sign in with a password. Each account sees what its groups allow. - 🔑 Permissions and groups replace scopes. Sixteen permissions, from
server:readtofiles:write, and four groups inconfig.yml(viewer,moderator,admin,owner) that you can change or extend. Tokens and accounts list either. Nobody hands out a permission they lack. The in-game token menu offers groups. - 🗂️ Configs and logs as files.
GET /fileslists a folder, andGET /files/readreads numbered lines a page at a time, the last lines, or by search with context, gzipped logs included.POST /files/editreplaces exact text,POST /files/setsets keys in YAML (comments kept),.properties, or JSON, andPUT /files/writereplaces a file. Writing needsfiles:write, which onlyownerhas. Every write keeps the previous version and checks the file didn’t change meanwhile.GET /server/configslists the server’s and each plugin’s configs. - 🧍 A player in one request.
GET /players/{player}?include=inventory,enderchest,effects,deaths,sessions,statistics,advancements. Inventories and ender chests of offline players now read from their playerdata.deathsgives the last death place and the newest five deaths with causes and killers. - 📦 Containers.
GET /worlds/{world}/containersfinds chests, barrels, shulker boxes, and the like near a point, with how many of an item each holds. New endpoints put items into a container’s slots, empty them, or add to a container. - 🧭 One search for everything.
GET /worlds/{world}/locate?kind=block|biome|structurefinds the nearest blocks, biomes, or structures, several targets at once. - 🐄 Entities without a flood.
GET /worlds/{world}/entities/summarycounts entities by type and names the busiest chunks with their hoppers. Entity lists page 25 at a time and filter by name and chunk. An entity shows a villager’s trades, a dropped item’s stack, its lead, and why it spawned. - 📈 Deeper numbers.
GET /server/performanceadds the JVM: memory pools, garbage collection, threads, classes, buffers.GET /server/systemdescribes the host: load, memory, swap, disk, container limits, open files.GET /serverlists the datapacks, andGET /server/pluginseach plugin’s config files. - 🖨️ The console live, on the
server.consoletopic, with tokens blanked as inGET /server/logs. - ⏹️
POST /server/stop, with a countdown like restart. - 🚨 A warning when WorldAPI is reachable without HTTPS. When a request comes from the internet straight to the port, or through a proxy that serves plain HTTP, the console shows a framed warning (at most every 6 hours) and the admin panel a red banner before anyone types a password. Requests from the machine itself and local networks don’t count.
limit=0on a paged list answers with the total alone.GET /players/{player}/inventoryand/enderchestread offline players from their playerdata too.- The OpenAPI document names each operation’s permission in
x-scope, the alternatives inx-scopes-any, and inx-also-needsthe one that coordinates and items need on top, so clients can tell what a token may call. invulnerablein entity and player data shows the flag thatPATCHsets again. Since Paper 26.3 build 205 the old check answers whether damage gets through, which is also true for a player in creative mode.- Exposed 1.6.0 inside the jar. Built against Paper API 26.3 build 205 with Gradle 9.8.1.
Upgrading from 2.x
- Tokens keep working.
readnow means theviewergroup,write:worldandwrite:playersmeanworld:writeandplayers:write, andadminis theadmingroup: everything butfiles:writeandcode. The log names tokens that still use the old names. Addgroupstoauthin yourconfig.ymlonly if you want to change them; the defaults apply without it. - The
adminscope no longer coverscode, and neither does theadmingroup. Givecodeor theownergroup to whoever runs Java scripts. - Removed:
GET /worlds/{world}/structures/nearestandGET /worlds/{world}/search. UseGET /worlds/{world}/locate; its results come infound, each withtype,x,y,z, anddistance. - Entity lists return 25 entities per page unless you pass
limit. - The
hellomessage on the WebSocket lists permissions such asserver:readinstead of scopes. - Vanished players show to clients with
players:moderaterather thanadmin; theadmingroup has it. - The database gets two tables,
accountsandadmin_sessions, on the first start. Nothing else changes in it.