This guide documents the current backend HTTP/WebSocket surface in this repository.
The HTTP server exposes:
- REST endpoints for registering, starting, stopping, listing, and deleting queries
- a WebSocket endpoint for streaming query results
- replay control endpoints for ingesting RDF files into storage and optional MQTT publication
Run it with:
cargo run --bin http_serverDefault address:
http://127.0.0.1:8080
curl -X POST http://localhost:8080/api/queries \
-H "Content-Type: application/json" \
-d '{
"query_id": "sensor_analysis",
"janusql": "PREFIX ex: <http://example.org/> SELECT ?sensor ?temp FROM NAMED WINDOW ex:w ON STREAM ex:sensorStream [START 0 END 9999999999999] WHERE { WINDOW ex:w { ?sensor ex:temperature ?temp . } }"
}'curl -X POST http://localhost:8080/api/queries/sensor_analysis/startws://localhost:8080/api/queries/sensor_analysis/results
The server sends JSON messages with:
query_idtimestamptypesourceashistoricalorlivebindings
curl -X POST http://localhost:8080/api/queries/sensor_analysis/stopDeletion is only allowed after the query is stopped.
curl -X DELETE http://localhost:8080/api/queries/sensor_analysiscurl -X POST http://localhost:8080/api/replay/start \
-H "Content-Type: application/json" \
-d '{
"input_file": "data/sensors.nq",
"broker_type": "none",
"topics": ["sensors"],
"rate_of_publishing": 1000,
"loop_file": false,
"add_timestamps": true
}'curl -X POST http://localhost:8080/api/replay/stopcurl http://localhost:8080/api/replay/statuscurl http://localhost:8080/ops/status| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| GET | /ops/status |
Detailed operational status |
| POST | /api/queries |
Register query |
| GET | /api/queries |
List queries |
| GET | /api/queries/:id |
Query details |
| POST | /api/queries/:id/start |
Start query |
| POST | /api/queries/:id/stop |
Stop query |
| DELETE | /api/queries/:id |
Delete stopped query |
| WS | /api/queries/:id/results |
Stream results |
| POST | /api/replay/start |
Start replay |
| POST | /api/replay/stop |
Stop replay |
| GET | /api/replay/status |
Replay status |
The maintained production dashboard lives separately:
https://github.com/SolidLabResearch/janus-dashboard