Zum Hauptinhalt springen

API & Automation

Connection

  • Default port: 22100 (configurable, 1024–65535)
  • Authentication: Bearer token in the Authorization: Bearer <token> header
  • API documentation: Interactive Redoc UI at /api/v1/docs
  • OpenAPI specification: /api/v1/openapi.json

REST API

The API provides 42 endpoints. Here are the most important ones:

VM Lifecycle

MethodEndpointDescription
GET/api/v1/vmsList all VMs
GET/api/v1/vms/:idVM details
POST/api/v1/vms/:id/startStart VM
POST/api/v1/vms/:id/stopStop VM (ACPI)
POST/api/v1/vms/:id/force-stopForce stop VM
POST/api/v1/vms/:id/pausePause VM
POST/api/v1/vms/:id/resumeResume VM

Snapshots

MethodEndpointDescription
GET/api/v1/vms/:id/snapshotsList snapshots
POST/api/v1/vms/:id/snapshotsCreate snapshot
POST/api/v1/vms/:id/snapshots/:sid/restoreRestore
DELETE/api/v1/vms/:id/snapshots/:sidDelete

Console

MethodEndpointDescription
GET/api/v1/vms/:id/consoleRead output
POST/api/v1/vms/:id/consoleSend text
POST/api/v1/vms/:id/console/executeExecute command
DELETE/api/v1/vms/:id/consoleClear buffer

Real-Time Events

Live events are available via WebSocket or Server-Sent Events (SSE) at /api/v1/events:

  • vm.started, vm.stopped, vm.paused, vm.resumed, vm.error
  • snapshot.created, snapshot.restored, snapshot.deleted
  • console.output
  • download.started, download.completed, download.failed

Webhooks

  • Event filter: Choose specific events or receive all
  • HMAC secret: Optional signature validation via X-Nemeton-Secret header
  • Async delivery: Non-blocking with automatic retry

MCP (Model Context Protocol)

A JSON-RPC 2.0 interface with 24 tools is available at /mcp:

ToolDescription
list_vmsList all VMs
start_vm / stop_vmStart / stop VM
send_consoleSend command to console
read_consoleRead console output
take_screenshotScreenshot as Base64 JPEG
create_snapshotCreate snapshot
clone_vmDuplicate VM as CoW clone
resize_diskEnlarge disk image
get_host_infoHost system information