REST API

To access the API, either log in via Steam as an administrator (owner) on the server's map page, or configure an API key. The API is located at http://YOUR-SERVER-IP:YOUR-SERVER-PORT and serves the resources documented below.

Warning: when using an API key, make sure it is a long, random string that cannot be recovered through brute-force attacks. Always keep your API key private. Access with a key like: /animals.json?apiKey=YOUR-API-KEY.

Note: each position is a three-dimensional vector — X and Z are the top-down position while Y is the height. rotation is an object's rotation around the Y-axis in degrees (0–360).

Server status public

Path: /status.json

{
  "hostname": "My Rust Server",
  "level": "Procedural Map",
  "world": { "size": 4000, "seed": 12345 },
  "env": { "time": 12.567 },
  "players": 50,
  "maxplayers": 100,
  "sleepers": 150,
  "headerimage": "http://myserverdomain/header.png",
  "url": "http://myserverdomain",
  "description": "My server description",
  "version": { "network": 2631, "save": 286, "io": "1.1.0" }
}

General configuration public

Path: /config.json

{ "displayMonuments": true, "displayBuildings": false, "displayMortality": true, "defaultLanguage": "en" }

Monuments public, configurable

Path: /monuments.json — takes the hideSpecificMonuments option into account.

[
  { "name": "lighthouse/lighthouse.prefab", "position": { "x": 534, "y": 0, "z": -658 }, "rotation": 28 },
  ...
]

Recent death locations public, configurable

Path: /deaths.json

[
  { "x": -321, "z": -766, "cause": "bullet" },
  ...
]

Recent players public

Path: /recent.json

[
  { "id": "71111111111111111", "name": "Somebody" },
  ...
]

Map image public

Path: /map.jpg (also /map.png). Subject to the terms of use.

Players admin-only

Path: /players.json

[
  {
    "id": "70000000000000000",
    "name": "Somebody",
    "position": { "x": 333, "y": 66, "z": 777 },
    "rotation": 135,
    "time": 123,
    "ip": "123.123.123.123:12345",
    "inventory": {
      "main": [ { "name": "stone.pickaxe", "amount": 1, "blueprint": false, "condition": 4 }, ... ],
      "belt": [ { "name": "stonehatchet", "amount": 1, "blueprint": false, "condition": 93 }, ... ],
      "wear": [ { "name": "burlap.shirt", "amount": 1, "blueprint": false }, ... ]
    }
  },
  ...
]

Sleepers admin-only

Path: /sleepers.json

[
  { "id": "71111111111111111", "name": "Somebody", "position": { "x": -444, "y": 11, "z": 1234 }, "rotation": 60 },
  ...
]

Animals admin-only

Path: /animals.json

[
  { "name": "boar.prefab", "position": { "x": -104, "y": 41, "z": 1512 }, "rotation": 90 },
  ...
]

Building foundations admin-only, configurable

Path: /buildings.json

[
  { "name": "foundation", "position": { "x": -1240, "y": 65, "z": -1050 }, "rotation": 334 },
  ...
]

Loot admin-only

Path: /loot.json

[
  {
    "name": "loot_trash.prefab",
    "position": { "x": 1488, "y": 15, "z": 622 },
    "inventory": [ { "name": "black.raspberries", "amount": 7, "blueprint": false } ]
  },
  ...
]

Resources admin-only

Path: /resources.json

[
  { "name": "ores/sulfur-ore.prefab", "position": { "x": -888, "y": 77, "z": -666 } },
  ...
]

Item types admin-only

Path: /items.json

[
  { "id": 776005741, "name": "knife.bone", "displayName": "Bone Knife", "category": "Weapon", "rarity": "Uncommon", "stackable": 1 },
  ...
]