Repository navigation
API Players
Players online and offline, what they carry, and what they've done. Every path starts with /api/v1.
| Endpoint | Permission | What it does |
|---|---|---|
GET /players |
players:read |
Everyone who has played here |
GET /players/online |
players:read |
Who is playing right now |
GET /players/{player} |
players:read (+ players:private) |
A player's profile, state, and whereabouts, with more parts on request |
PATCH /players/{player} |
players:write |
Change game mode, health, food, XP, flight, speed, names, and more |
POST /players/{player}/kick |
players:moderate |
Kick a player |
POST /players/{player}/message |
players:write |
Send a chat message, title, action bar, or sound to one player |
POST /players/{player}/teleport |
players:write |
Teleport to coordinates, a player, or a world spawn |
| Endpoint | Permission | What it does |
|---|---|---|
GET /players/{player}/enderchest |
players:read (+ players:private) |
Ender chest contents |
DELETE /players/{player}/enderchest |
players:write |
Empty the whole ender chest |
POST /players/{player}/enderchest/give |
players:write |
Add an item to the ender chest |
PATCH /players/{player}/enderchest/slots/{slot} |
players:write |
Put an item in an ender chest slot |
DELETE /players/{player}/enderchest/slots/{slot} |
players:write |
Empty an ender chest slot |
POST /players/{player}/enderchest/slots/{slot}/take |
players:write |
Take some items from an ender chest slot |
GET /players/{player}/inventory |
players:read (+ players:private) |
Main inventory, armor, and offhand with full item data |
DELETE /players/{player}/inventory |
players:write |
Empty the whole inventory |
POST /players/{player}/inventory/give |
players:write |
Add an item to the inventory |
PATCH /players/{player}/inventory/slots/{slot} |
players:write |
Put an item in an inventory slot |
DELETE /players/{player}/inventory/slots/{slot} |
players:write |
Empty an inventory slot |
POST /players/{player}/inventory/slots/{slot}/take |
players:write |
Take some items from an inventory slot |
| Endpoint | Permission | What it does |
|---|---|---|
GET /players/{player}/advancements |
players:read |
Advancements, done and in progress, with dates |
POST /players/{player}/advancements/{key} |
players:write |
Grant an advancement |
DELETE /players/{player}/advancements/{key} |
players:write |
Revoke an advancement |
GET /players/{player}/effects |
players:read |
Active potion effects |
POST /players/{player}/effects |
players:write |
Give a potion effect |
DELETE /players/{player}/effects |
players:write |
Remove every effect |
DELETE /players/{player}/effects/{effect} |
players:write |
Remove one effect |
GET /players/{player}/permissions |
players:read |
Operator state, and whether the player has a permission |
PATCH /players/{player}/permissions |
server:console |
Make a player an operator or take it away |
GET /players/{player}/sessions |
players:read |
Play sessions WorldAPI recorded, newest first |
GET /players/{player}/statistics |
players:read |
Every vanilla statistic, grouped by category |
-
GET /players/{player}?include=inventory,enderchest,effects,deaths,sessions,statistics,advancements,targetadds those parts to the profile in one answer.target, for an online player and withplayers:private, is what they look at: the first block in their line of sight within 64 blocks with thefaceit hits, the nearest entity before it, the distance to each, andeye, where their eyes are and which way they look. An offline player's inventory and ender chest come from their playerdata file.deathsholds the last place the game saw them die and the newest five deaths from the history, with causes and killers. - Changing a player's state, inventory, or effects needs them online; otherwise the answer is
409 player_offline. Statistics and advancements still read from the saved files. -
GET /players/{player}/advancementslists every advancement on the server, started or not, with its title and parent, sodone=falsereads as what's left to do. - Statistics use vanilla ids, as in the stats files:
custom:play_time,mined:diamond_ore,killed:zombie.
WorldAPI calls a player vanished while a vanish plugin (SuperVanish, PremiumVanish, Essentials, and others) sets the vanished metadata on them. To every client without players:moderate, visitors included, they look offline:
- They're missing from
GET /players/onlineand the online counts inGET /serverandGET /server/performance. -
GET /playersandGET /players/{player}show them withonline: false, no live state, and no position. Leaderboards mark them offline. - Entity lists leave them out, and
GET /worlds/{world}/entities/{uuid}answers404. - Endpoints that need an online player answer
409 player_offline, so aplayers:writetoken can't reach them either. -
GET /eventsandGET /players/{player}/sessionsleave out what was recorded while the player was vanished.
Items look the same everywhere: inventories, ender chests, containers, entity equipment, and the player.inventory topic. Next to the type, name, and enchantments, an item carries whatever applies to it:
-
storedEnchantmentson enchanted books; -
attributes, the modifiers the game applies, a type's defaults included; -
potionwith the effects of a potion, tipped arrow, or suspicious stew; -
trim,dyedColor, andrepairCostfor the anvil; - a written book's title and author, without its pages;
- a firework's flight and explosions;
- the
contentsof a shulker box or bundle, one level deep.
Fields that don't apply are left out, and components still holds the whole item in command syntax. Attribute amounts are what the item adds: the tooltip shows attack damage 1 higher and attack speed 4 higher, since it counts the player's base values.
GET /icons/minecraft:diamond_sword returns an item's icon as a PNG, for item grids: blocks as the game's isometric cube at 64×64, other items flat at their texture's size. It's not in the OpenAPI document. Until WorldAPI has downloaded the game client, the answer is 503 icons_loading with Retry-After.
Next: Leaderboards.