Skip to content

API Reference ​

MeshManager provides a REST API for programmatic access to mesh network data.

Base URL ​

All API endpoints are prefixed with /api:

http://localhost:8080/api/

Authentication ​

Currently, the API does not require authentication. Future versions may add API token support.

Response Format ​

All responses are JSON. Successful responses typically return the requested data directly. Error responses include a detail field:

json
{
  "detail": "Node not found"
}

Endpoints Overview ​

Nodes ​

MethodEndpointDescription
GET/api/nodesList all nodes
GET/api/nodes/{id}Get node by ID
GET/api/nodes/by-node-num/{node_num}Get node by node number
GET/api/nodes/rolesList unique node roles

Telemetry ​

MethodEndpointDescription
GET/api/telemetry/{node_num}Recent telemetry for a node
GET/api/telemetry/{node_num}/history/{metric}Historical data for specific metric

Sources ​

MethodEndpointDescription
GET/api/sourcesList all data sources

Analysis ​

MethodEndpointDescription
GET/api/analysis/solar-nodesList identified solar nodes
GET/api/analysis/solar-forecastSolar forecast analysis
GET/api/solarSolar production data

Admin Endpoints ​

Admin endpoints require authentication when enabled:

MethodEndpointDescription
POST/api/admin/sourcesCreate a new source
PUT/api/admin/sources/{id}Update a source
DELETE/api/admin/sources/{id}Delete a source
POST/api/admin/sources/{id}/syncTrigger data sync

Common Query Parameters ​

Filtering Nodes ​

GET /api/nodes?source_id={uuid}&active_only=true&active_hours=24
ParameterTypeDescription
source_idUUIDFilter by source
active_onlybooleanOnly show recently active nodes
active_hoursintegerHours to consider "active" (1-8760)

Telemetry History ​

GET /api/telemetry/{node_num}/history/{metric}?hours=24
ParameterTypeDescription
hoursintegerHours of history to fetch (1-168)

Solar Analysis ​

GET /api/analysis/solar-forecast?lookback_days=7
ParameterTypeDescription
lookback_daysintegerDays of history to analyze (1-90)

Detailed Endpoint Documentation ​