Get Started
Docs/Integration & Extensibility/API Reference
REST API

REST API Reference

Complete RESTful endpoint reference for authentication, telemetry, commands, and task control.

1. Authentication

POST /api/auth/login
Body: {"username": "AdminUser", "password": "admin"}
Response: {"ok": true, "token": "<HMAC_TOKEN>", "role": "owner"}

2. Telemetry & Metrics

  • GET /api/status - Health, food, coordinates, active task
  • GET /api/nav-status - Navigation path, goal, stuck status
  • GET /api/inv-status - 36-slot layout, slot fullness
  • GET /api/safety-status - Lava proximity, low health, danger flags
  • GET /api/tool-status - Durability of tools and weapons

3. Command Execution

POST /api/command
Headers: Authorization: Bearer <HMAC_TOKEN>
Body: { "message": "mine 64 diamonds", "source": "api" }

Response:
{
  "ok": true,
  "status": "queued",
  "taskId": "task_1726000000_1234",
  "skillName": "mine",
  "params": { "targetOre": "diamond", "quantity": 64 }
}

4. Task Management

  • DELETE /api/tasks/:taskId - Cancels a specific task by ID
  • DELETE /api/tasks - Emergency halt; clears all queued and active tasks