{"openapi":"3.1.0","info":{"title":"FitTrack CentralDB API","description":"The API for the FitTrack CentralDB service.","version":"1.0.0"},"paths":{"/activities":{"get":{"summary":"Get All Activities","operationId":"get_all_activities_activities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Activity"},"type":"array","title":"Response Get All Activities Activities Get"}}}}}},"post":{"summary":"Upload Activity","operationId":"upload_activity_activities_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_activity_activities_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/activities/{activity_id}":{"get":{"summary":"Get Activity By Id","operationId":"get_activity_by_id_activities__activity_id__get","parameters":[{"name":"activity_id","in":"path","required":true,"schema":{"type":"integer","title":"Activity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/activities/{activity_id}/analysis":{"post":{"summary":"Create Analysis Artifact","operationId":"create_analysis_artifact_activities__activity_id__analysis_post","parameters":[{"name":"activity_id","in":"path","required":true,"schema":{"type":"integer","title":"Activity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisArtifactCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisArtifact"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coaching/sessions":{"get":{"summary":"Get All Coaching Sessions","operationId":"get_all_coaching_sessions_coaching_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CoachingSession"},"type":"array","title":"Response Get All Coaching Sessions Coaching Sessions Get"}}}}}},"post":{"summary":"Create Coaching Session","operationId":"create_coaching_session_coaching_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachingSessionCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachingSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users":{"post":{"summary":"Create User","operationId":"create_user_users_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Read Users","operationId":"read_users_users_get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"},"title":"Response Read Users Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}":{"get":{"summary":"Read User","operationId":"read_user_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update User","operationId":"update_user_users__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete User","operationId":"delete_user_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health_metrics":{"post":{"summary":"Create Health Metric","operationId":"create_health_metric_health_metrics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthMetricCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthMetric"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health_metrics/{metric_id}":{"get":{"summary":"Read Health Metric","operationId":"read_health_metric_health_metrics__metric_id__get","parameters":[{"name":"metric_id","in":"path","required":true,"schema":{"type":"integer","title":"Metric Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthMetric"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Health Metric","operationId":"update_health_metric_health_metrics__metric_id__put","parameters":[{"name":"metric_id","in":"path","required":true,"schema":{"type":"integer","title":"Metric Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthMetricUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthMetric"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Health Metric","operationId":"delete_health_metric_health_metrics__metric_id__delete","parameters":[{"name":"metric_id","in":"path","required":true,"schema":{"type":"integer","title":"Metric Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/health_metrics":{"get":{"summary":"Read Health Metrics By User","operationId":"read_health_metrics_by_user_users__user_id__health_metrics_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HealthMetric"},"title":"Response Read Health Metrics By User Users User Id Health Metrics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workout_plans":{"post":{"summary":"Create Workout Plan","operationId":"create_workout_plan_workout_plans_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutPlanCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutPlan"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workout_plans/{plan_id}":{"get":{"summary":"Read Workout Plan","operationId":"read_workout_plan_workout_plans__plan_id__get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutPlan"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Workout Plan","operationId":"update_workout_plan_workout_plans__plan_id__put","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutPlanUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutPlan"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Workout Plan","operationId":"delete_workout_plan_workout_plans__plan_id__delete","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/workout_plans":{"get":{"summary":"Read Workout Plans By User","operationId":"read_workout_plans_by_user_users__user_id__workout_plans_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutPlan"},"title":"Response Read Workout Plans By User Users User Id Workout Plans Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["Root"],"summary":"Read Root","operationId":"read_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Activity":{"properties":{"user_id":{"type":"integer","title":"User Id"},"file_path":{"type":"string","title":"File Path"},"activity_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Activity Metadata"},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["user_id","file_path","id","created_at"],"title":"Activity"},"AnalysisArtifact":{"properties":{"activity_id":{"type":"integer","title":"Activity Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["activity_id","data","id","created_at"],"title":"AnalysisArtifact"},"AnalysisArtifactCreate":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"AnalysisArtifactCreate"},"Body_upload_activity_activities_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_activity_activities_post"},"CoachingSession":{"properties":{"conversation":{"additionalProperties":true,"type":"object","title":"Conversation"},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["conversation","id","created_at"],"title":"CoachingSession"},"CoachingSessionCreate":{"properties":{"conversation":{"additionalProperties":true,"type":"object","title":"Conversation"}},"type":"object","required":["conversation"],"title":"CoachingSessionCreate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthMetric":{"properties":{"user_id":{"type":"integer","title":"User Id"},"metric_type":{"type":"string","title":"Metric Type"},"value":{"type":"number","title":"Value"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["user_id","metric_type","value","id"],"title":"HealthMetric"},"HealthMetricCreate":{"properties":{"user_id":{"type":"integer","title":"User Id"},"metric_type":{"type":"string","title":"Metric Type"},"value":{"type":"number","title":"Value"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["user_id","metric_type","value"],"title":"HealthMetricCreate"},"HealthMetricUpdate":{"properties":{"metric_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metric Type"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"}},"type":"object","title":"HealthMetricUpdate"},"User":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Preferences"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["name","email","id"],"title":"User"},"UserCreate":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Preferences"}},"type":"object","required":["name","email"],"title":"UserCreate"},"UserUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Preferences"}},"type":"object","title":"UserUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkoutPlan":{"properties":{"user_id":{"type":"integer","title":"User Id"},"plan_details":{"additionalProperties":true,"type":"object","title":"Plan Details"},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["user_id","plan_details","id","created_at"],"title":"WorkoutPlan"},"WorkoutPlanCreate":{"properties":{"user_id":{"type":"integer","title":"User Id"},"plan_details":{"additionalProperties":true,"type":"object","title":"Plan Details"}},"type":"object","required":["user_id","plan_details"],"title":"WorkoutPlanCreate"},"WorkoutPlanUpdate":{"properties":{"plan_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Plan Details"}},"type":"object","title":"WorkoutPlanUpdate"}}}}