Every prediction, every insight, every recommendation flows through a clean RESTful interface. JSON in, intelligence out. All endpoints return structured responses with consistent error handling.
http://localhost:5000
Health Logs
Daily health metrics — the primary data source for all AI predictions.
/api/health-logs
Paginated
Retrieve all health logs. Supports pagination, date filtering, and sort order.
pageinteger, default 1per_pageinteger, default 20, max 100sort_orderasc | desc, default descstart_dateYYYY-MM-DDend_dateYYYY-MM-DD{
"logs": [{
"id": 184,
"date": "2026-05-13",
"mood": 7.5,
"energy": 8.0,
"stress": 3.5
}],
"total": 184,
"page": 1
}
/api/health-logs
Create a new daily health log entry. Triggers model retraining if threshold reached.
{
"date": "2026-05-13",
"mood": 7.5,
"energy": 8.0,
"stress": 3.5,
"sleep_hours": 7.5,
"exercise_type": "running",
"exercise_minutes": 45,
"water_intake_ml": 2400
}
{
"id": 185,
"message": "Health log created",
"retrained": false
}
/api/health-logs/:id
Update specific fields of an existing health log.
/api/health-logs/:id
Permanently delete a health log entry.
Activity Logs
Real-time activity tracking with before/after energy measurements.
/api/activity-logs
Paginated
Retrieve activity logs. Filter by category, date range, or activity name.
categoryexercise | work | social | restactivitystring, partial matchpageinteger{
"logs": [{
"activity": "Morning Run",
"energy_before": 6.0,
"energy_after": 8.5,
"duration_minutes": 45
}]
}
/api/activity-logs
Log a completed activity with before/after energy measurements.
AI & Predictions
The intelligence layer — train models, generate predictions, analyze influence.
/api/train
Requires 5+ logs
Train all five AI models on current health log data. Returns performance metrics.
{
"status": "trained",
"samples": 146,
"metrics": {
"rmse": 0.84,
"mae": 0.67,
"r2": 0.82
}
}
/api/predict
Generate predictions for all 8 prediction types using current data.
{
"energy_tomorrow": 7.8,
"mood_tomorrow": 7.2,
"burnout_risk": 0.18,
"performance_index": 0.74,
"recovery_needed": false,
"optimal_activity_time": "09:00-11:00"
}
/api/influence
Analyze causal influence between variables using the Bayesian Network.
{
"variable": "sleep_hours",
"change": +1.5
}
{
"direct_effects": {
"energy": +1.2,
"mood": +0.8
},
"indirect_effects": {
"stress": -0.6
}
}
/api/patterns
Retrieve discovered behavioral patterns, correlations, and anomalies.
Goals & Habits
AI-powered goal decomposition and habit tracking.
/api/goals
Retrieve all active goals with AI-generated milestones and progress tracking.
/api/goals
Create a new goal. AURA automatically decomposes it into actionable milestones.
{
"title": "Improve sleep quality",
"target_metric": "sleep_hours",
"target_value": 8.0,
"deadline": "2026-06-01"
}
/api/habits
Retrieve habit tracking data with streak information and completion rates.
Notifications
Intelligent alerts triggered by AI-detected patterns and thresholds.
/api/notifications
Retrieve pending and historical notifications with read status.
/api/notifications/:id/read
Mark a notification as read.