/archive
Read waveforms, browse the SDS day-file index, download raw MiniSEED files, and export to multiple formats. Archive →
The rpi-seism API is a FastAPI application that sits in front of the SDS archive and SQLite bookmark store. It exposes two routers — /archive and /bookmarks — consumed by the Angular web dashboard and any external tooling.
| Environment | URL |
|---|---|
| Local development | http://localhost:8000 |
| Production (same host as dashboard) | http://<pi-hostname>:8000 |
/archive
Read waveforms, browse the SDS day-file index, download raw MiniSEED files, and export to multiple formats. Archive →
/bookmarks
Persist, query, update, and delete named time-window bookmarks backed by SQLite. Bookmarks →
The API reads config.yml at startup via the shared rpi-seism-common settings model.
The SDS root and station.xml paths are derived from the RPI_SEISM_PATH environment variable (default /usr_data).
# Override data path (e.g. for Docker)export RPI_SEISM_PATH=/mnt/seism-datafastapi run app.main:app$RPI_SEISM_PATH/├── config.yml ← settings loaded at startup├── station.xml ← instrument response (auto-generated by daemon)├── archive/ ← SDS tree consumed by /archive│ └── YEAR/NET/STA/CHAN.D/...└── data/ └── database.db ← SQLite bookmark storeThe SQLite database path defaults to ./data/database.db and can be overridden with the DB_PATH env var for Docker compatibility.
Migrations are managed by Alembic — run them once before first startup:
cd appalembic upgrade headAll origins are allowed in the default configuration (allow_origins=["*"]). Tighten this to your dashboard’s origin in production.
GET /archive/healthReturns JSON confirming the SDS root and station.xml paths resolve correctly — useful for container readiness probes.
{ "status": "ok", "sds_root": "/usr_data/archive", "sds_exists": true, "station_xml": "/usr_data/station.xml", "xml_exists": true, "network": "XX", "station": "RPI3"}