Skip to content

API Reference

John V. Teixido🍉 edited this page Mar 26, 2026 · 2 revisions

API Reference

The RootSpace API allows developers to programmatically interact with the local node, deploy agents, and query network state. The API is exposed via a RESTful HTTP server managed by the Node.js companion app, while low-level operations are proxied to the Rust core.


📡 REST Endpoints

GET /api/v1/status

Returns the current health and synchronization status of the RootSpace node.

{
  "status": "online",
  "version": "1.0.1",
  "peers_connected": 12,
  "uptime_seconds": 3600
}

POST /api/v1/agents/deploy

Upload a new WebAssembly agent binary for execution.

Headers:

  • Content-Type: application/wasm
  • X-Agent-Name: string (optional)

Response (201 Created):

{
  "agent_id": "ag_9f8a8b7c6d5e...",
  "status": "queued"
}

GET /api/v1/agents/:id/telemetry

Fetch realtime resource usage for a specific agent.

{
  "agent_id": "ag_9f8a8b7c6d5e...",
  "cpu_usage_pct": 2.4,
  "memory_mb": 14.2,
  "state": "running"
}

🛠️ CLI Reference

The rootspace CLI is the primary way operators interact with the Daemon.

Command Description
rootspace start Starts the local P2P node and API server.
rootspace deploy <path/to.wasm> Deploys a compiled Wasm agent to the local node.
rootspace peers Lists all currently connected P2P network peers.
rootspace stop Gracefully shuts down the node.

Clone this wiki locally