REST API for LANEye Network Scanner
http://localhost:8000
Get all discovered hosts
{ "hosts": [ { "id": 1, "ip": "192.168.1.100", "mac": "00:1A:2B:3C:4D:5E", "hostname": "laptop-01", "vendor": "Apple", "status": "online", "first_seen": "2025-10-18T10:00:00", "last_seen": "2025-10-18T15:00:00" } ], "count": 1 }
Get specific host details
host_id
(path): Host IDTrigger manual network scan
{ "interface": "eth0", "subnet": "192.168.1.0/24", "interval": 60 }
Get network statistics
{ "total_hosts": 45, "online_hosts": 38, "offline_hosts": 7 }
Export data to ELK stack
{ "status": "success", "exported": 45 }
Prometheus metrics endpoint for Grafana
# HELP laneye_hosts_total Total number of discovered hosts # TYPE laneye_hosts_total gauge laneye_hosts_total 45 # HELP laneye_hosts_online Number of online hosts # TYPE laneye_hosts_online gauge laneye_hosts_online 38
WebSocket connection for real-time updates
ws://localhost:8000/ws
{ "type": "host_discovered", "data": { "ip": "192.168.1.105", "mac": "AA:BB:CC:DD:EE:FF", "status": "online" }, "timestamp": "2025-10-18T15:30:00" }