API Reference
Complete AutoDoctor API endpoint reference with paths, methods, purpose, and request/response examples for health, system, alerts, module telemetry, and dashboard summary data.
Categories:
Base URL
Default local URL:
http://127.0.0.1:8000
Authentication
By default, API key auth is disabled.
If AUTO_DOCTOR_API_KEY is set, include header:
X-AutoDoctor-Key: <secret>
Endpoints
GET /health
Purpose:
- API liveness check
Example response:
{"status":"ok","service":"AutoDoctor API","version":"1.2.0"}
GET /api/system/latest
Purpose:
- Latest row from
system_info
GET /api/system/history
Purpose:
- Up to 500 historical
system_inforows ordered ascending by timestamp
GET /api/alerts
Purpose:
- Alert counts grouped by severity
GET /api/health
Purpose:
- Health score trend from
diagnostics
GET /api/modules
Purpose:
- Success/failure counts per module from
telemetry_modules
GET /api/dashboard/meta
Purpose:
- Dashboard metadata (
run_id, host, generation time) fromlatest_run.json
GET /api/dashboard/summary
Purpose:
- Builds a higher-level summary from
AutoDoctor_Report.jsonpluslatest_run.json - Returns health display, main concern, metric states, trend-window context, and grouped findings
High-value fields:
health.numerichealth.displayhealth.summaryhealth.main_concernwindow.labelwindow.used_fallbackmetric_stateswhy_health_changedlatest_findings
Quick Test Commands
Invoke-RestMethod http://127.0.0.1:8000/health
Invoke-RestMethod http://127.0.0.1:8000/api/system/latest
Invoke-RestMethod http://127.0.0.1:8000/api/system/history
Invoke-RestMethod http://127.0.0.1:8000/api/alerts
Invoke-RestMethod http://127.0.0.1:8000/api/health
Invoke-RestMethod http://127.0.0.1:8000/api/modules
Invoke-RestMethod http://127.0.0.1:8000/api/dashboard/meta
Invoke-RestMethod http://127.0.0.1:8000/api/dashboard/summary
Error Patterns
401 Unauthorized: API key required/mismatch500: DB unavailable or query/runtime exception- empty summary payload: report JSON not present yet, or no scan has completed successfully