1.1 KiB
1.1 KiB
name, description, metadata
| name | description | metadata | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| fleet-api | Machine registry API for fleet management |
|
Fleet API
Minimal REST API for machine registration and discovery.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/machines/register |
Register/heartbeat a machine |
| GET | /api/machines |
List all registered machines |
| DELETE | /api/machines/:id |
Unregister a machine |
Registration Payload
{
"id": "machine-uuid",
"name": "dev-machine-1",
"url": "http://192.168.1.10:3000",
"version": "1.0.0",
"skills": ["caddy", "ttyd", "dashboard"],
"status": "running"
}
Dependencies
Requires socat and jq to be installed:
apt-get install -y socat jq
Configuration
FLEET_API_PORT- API server port (default: 3001)FLEET_DATA_DIR- Data directory (default: /data/fleet)
Storage
Machines stored in machines.json with lastSeen timestamps.
Machines with lastSeen > 60 seconds are marked as status: unknown.