⚠️ The latest release is unstable — use preview builds instead
Skip to content

REST API

HTTP API for monitoring and controlling your server programmatically.

What You Can Do

  • Get server status and player list
  • Control in-game time
  • Manage farmhand slots
  • Read and modify settings
  • Send and receive chat messages (WebSocket)

Endpoints

CategoryExamples
ServerStatus, health, rendering control
PlayersConnected players, invite codes
FarmhandsSlot management
SettingsRead/write server configuration
CabinsCabin state and positions
TimeIn-game time control

WebSocket

Real-time bidirectional communication at /ws. Used by the Discord bot for chat relay.

javascript
const ws = new WebSocket("ws://localhost:8080/ws");

ws.onmessage = (event) => {
  const msg = JSON.parse(event.data);
  if (msg.type === "chat") {
    console.log(`${msg.payload.playerName}: ${msg.payload.message}`);
  }
};

Use Cases

  • Custom Discord bots
  • Server monitoring dashboards
  • Automation scripts
  • External admin tools

Full Reference

See API Reference for complete endpoint documentation.

Released under the MIT License.