Back to Developer Portal

REST API Reference

The PocketMC desktop service hosts a local loopback HTTP daemon on port 25585 by default. All endpoints accept and return JSON.

Base URL: http://127.0.0.1:25585
Auth Header: Authorization: Bearer <token>
GET /api/v1/health

Returns health status, active application version, host OS platform, and count of running Minecraft instances.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "status": "ok",
  "version": "1.9.3",
  "platform": "win-x64",
  "activeInstances": 2
}
GET /api/v1/instances

Lists all configured server instances with their live runtime statuses, CPU and RAM metrics, allocated memory, and player counts.

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "id": "paper-121",
    "name": "PaperMC Survival",
    "software": "PaperMC",
    "version": "1.21.1",
    "javaVersion": "21",
    "port": 25565,
    "status": "running",
    "playersOnline": 4,
    "maxPlayers": 20,
    "memoryMb": 4096
  }
]
POST /api/v1/instances/{id}/start

Starts the target server instance. Automatically provisions required Adoptium Java runtimes and binds active network tunnels.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "success": true,
  "message": "Instance paper-121 started successfully."
}
POST /api/v1/instances/{id}/stop

Initiates a graceful server shutdown via RCON save-all and stop to prevent chunk corruption.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "success": true,
  "message": "Instance paper-121 shutdown initiated."
}
GET /api/v1/instances/{id}/logs

Retrieves recent console log output. Sensitive strings (passwords, IP addresses, tokens) are automatically redacted by the daemon before delivery.

POST /api/v1/instances/{id}/backup

Creates an atomic ZIP snapshot of the world and instance directory with SHA-256 verification, replicating directly to configured cloud providers.