AI Endurance - Running, Cycling, Triathlon
AI Endurance - Running, Cycling, Triathlon · GPT アクション
Get user data
Retrieves workout and recovery data
GET /api/o/future_workout_static/GetFutureWorkoutGet future workouts
GET /api/o/cycling_activity/GetCyclingActivityRetrieve completed cycling activities
GET /api/o/running_activity/GetRunningActivityRetrieve completed running activities
GET /api/o/swimming_activity_detail/GetSwimmingActivityRetrieve completed swimming activities
GET /api/o/recovery_model/GetRecoveryModelRetrieve recovery status
GET /api/o/user/GetUserDetailsRetrieve user details
元の API スキーマ
{
"openapi": "3.1.0",
"info": {
"title": "Get user data",
"description": "Retrieves workout and recovery data",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://aiendurance.com"
}
],
"paths": {
"/api/o/future_workout_static/": {
"get": {
"description": "Get future workouts",
"operationId": "GetFutureWorkout",
"parameters": [
{
"name": "startDate",
"in": "query",
"description": "The start date for filtering workouts, in ISO date-time format.",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "endDate",
"in": "query",
"description": "The end date for filtering workouts, in ISO date-time format.",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"responses": {
"200": {
"description": "A list of future workouts",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FutureWorkout"
}
}
}
}
}
}
}
},
"/api/o/cycling_activity/": {
"get": {
"description": "Retrieve completed cycling activities",
"operationId": "GetCyclingActivity",
"responses": {
"200": {
"description": "A list of past cycling activities",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CyclingActivity"
}
}
}
}
}
}
}
},
"/api/o/running_activity/": {
"get": {
"description": "Retrieve completed running activities",
"operationId": "GetRunningActivity",
"responses": {
"200": {
"description": "A list of past running activities",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RunningActivity"
}
}
}
}
}
}
}
},
"/api/o/swimming_activity_detail/": {
"get": {
"description": "Retrieve completed swimming activities",
"operationId": "GetSwimmingActivity",
"responses": {
"200": {
"description": "A list of past swimming activities",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SwimmingActivityDetail"
}
}
}
}
}
}
}
},
"/api/o/recovery_model/": {
"get": {
"description": "Retrieve recovery status",
"operationId": "GetRecoveryModel",
"responses": {
"200": {
"description": "A list of recovery status",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RecoveryModel"
}
}
}
}
}
}
}
},
"/api/o/user/": {
"get": {
"description": "Retrieve user details",
"operationId": "GetUserDetails",
"responses": {
"200": {
"description": "A list of user properties",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"FutureWorkout": {
"type": "object",
"properties": {
"act_type": {
"type": "string",
"enum": [
"Ride",
"Run",
"Swim"
],
"description": "Type of workout: Ride, Run, or Swim."
},
"date": {
"type": "string",
"format": "date-time",
"description": "Date and time of the workout."
},
"steps": {
"type": "string",
"description": "Dictionary of workout steps with relevant information."
},
"title": {
"type": "string",
"maxLength": 200,
"description": "Name of the workout."
},
"total": {
"type": "string",
"description": "Total workout time description, e.g., Workout time: 60 min."
},
"warmup": {
"type": "string",
"description": "Description of the workout's warmup."
},
"intervals": {
"type": "string",
"description": "Description of the workout's intervals."
},
"cooldown": {
"type": "string",
"description": "Description of the workout's cooldown."
},
"activity_movingtime": {
"type": "number",
"description": "Time in seconds the athlete should be moving."
},
"distrib": {
"type": "string",
"description": "Distribution for activity in zones as a dictionary."
},
"ess": {
"type": "number",
"nullable": true,
"description": "Expected external stress score."
},
"target_units": {
"type": "string",
"maxLength": 200,
"nullable": true,
"description": "Unit of workout targets, e.g., Watts, m/s."
},
"is_completed": {
"type": "boolean",
"description": "Indicates if the workout was completed by the user."
},
"is_long": {
"type": "boolean",
"description": "Indicates if this is a long endurance workout."
},
"is_taper": {
"type": "boolean",
"description": "Indicates if this is a taper workout."
},
"is_post_race_recovery": {
"type": "boolean",
"description": "Indicates if this is a post-race recovery workout."
},
"is_skipped": {
"type": "boolean",
"description": "Indicates if the workout was skipped by the user."
},
"order": {
"type": "integer",
"nullable": true,
"description": "Order to perform this workout on a given day."
},
"is_brick": {
"type": "boolean",
"description": "Indicates if this is a brick workout."
},
"advice": {
"type": "string",
"nullable": true,
"description": "Additional instructions for the workout."
},
"swim_session_advice": {
"type": "string",
"nullable": true,
"description": "Instructions for swim workout execution."
},
"swim_distance": {
"type": "integer",
"nullable": true,
"description": "Swim distance of the workout in meters."
},
"run_distance": {
"type": "number",
"nullable": true,
"description": "Run distance of the workout in kilometers."
},
"swim_sections": {
"type": "string",
"description": "Dictionary of swim workout sections."
},
"critical_swim_speed": {
"type": "number",
"nullable": true,
"description": "Critical swim speed in meters/second at the time of workout creation."
},
"kcal": {
"type": "number",
"nullable": true,
"description": "Kilo calories consumed during the activity."
},
"hr_aerobic_thresh": {
"type": "number",
"nullable": true,
"description": "Heart rate at aerobic threshold, where DFA alpha 1 is 0.75."
}
}
},
"CyclingActivity": {
"type": "object",
"properties": {
"activity_date": {
"type": "string",
"format": "date-time",
"description": "Activity start datetime in UTC."
},
"activity_date_local": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Activity start datetime in user local time zone."
},
"activity_name": {
"type": "string",
"maxLength": 250,
"description": "Name of the activity."
},
"activity_type": {
"type": "string",
"maxLength": 200,
"description": "Type of ride, e.g., Ride or VirtualRide."
},
"activity_movingtime": {
"type": "number",
"description": "Time in seconds the athlete was moving."
},
"activity_avwatts": {
"type": "number",
"description": "Average power in Watts for this activity."
},
"activity_haspower": {
"type": "boolean",
"description": "Indicates if the activity has power data."
},
"power_is_from_hr": {
"type": "boolean",
"description": "Indicates if power values are measured or predicted from heart rate."
},
"activity_avhr": {
"type": "number",
"nullable": true,
"description": "Average heart rate in bpm."
},
"external_stress_score": {
"type": "number",
"nullable": true,
"description": "External stress score."
},
"elevation_gain": {
"type": "number",
"nullable": true,
"description": "Elevation gain during activity in meters."
},
"distance_in_km": {
"type": "number",
"nullable": true,
"description": "Distance covered in km."
},
"hrv_artifact_percentage": {
"type": "number",
"nullable": true,
"description": "Percentage of RR measurements that are artifacts."
},
"hrv_artifact_percentage_local": {
"type": "number",
"nullable": true,
"description": "Local artifact percentage for part of the activity."
},
"aerobic_threshold_dfa_alpha1_watts_ramp": {
"type": "number",
"nullable": true,
"description": "Power where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_watts_ramp": {
"type": "number",
"nullable": true,
"description": "Power where dfa alpha 1 crosses 0.5."
},
"aerobic_threshold_dfa_alpha1_heart_rate_ramp": {
"type": "number",
"nullable": true,
"description": "Heart rate where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_heart_rate_ramp": {
"type": "number",
"nullable": true,
"description": "Heart rate where dfa alpha 1 crosses 0.5."
},
"aerobic_threshold_dfa_alpha1_watts_cluster": {
"type": "number",
"nullable": true,
"description": "Clustered power where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_watts_cluster": {
"type": "number",
"nullable": true,
"description": "Clustered power where dfa alpha 1 crosses 0.5."
},
"aerobic_threshold_dfa_alpha1_heart_rate_cluster": {
"type": "number",
"nullable": true,
"description": "Clustered heart rate where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_heart_rate_cluster": {
"type": "number",
"nullable": true,
"description": "Clustered heart rate where dfa alpha 1 crosses 0.5."
},
"mean_of_dfa_alpha1_times_power_or_pace": {
"type": "number",
"nullable": true,
"description": "Mean of alpha times power/pace values recovery metric."
},
"mean_of_dfa_alpha1_times_power_or_pace_normalized_over_two_weeks_in_percent": {
"type": "number",
"nullable": true,
"description": "Normalized mean of alpha times power/pace values over last 2 weeks."
},
"aerobic_durability_according_to_dfa_alpha1_in_percent": {
"type": "number",
"nullable": true,
"description": "Drift of alpha times power/pace in first half compared to second half."
},
"average_of_dfa_alpha1": {
"type": "number",
"nullable": true,
"description": "Average dfa alpha 1."
},
"internal_stress_score": {
"type": "number",
"nullable": true,
"description": "Internal stress score derived from dfa alpha 1."
},
"kcal": {
"type": "number",
"nullable": true,
"description": "Consumed kilo calories during activity."
}
}
},
"RunningActivity": {
"type": "object",
"properties": {
"activity_date": {
"type": "string",
"format": "date-time",
"description": "Activity start datetime in UTC."
},
"activity_date_local": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Activity start datetime in user local time zone."
},
"activity_name": {
"type": "string",
"maxLength": 250,
"description": "Name of the activity."
},
"activity_type": {
"type": "string",
"maxLength": 200,
"description": "Type of run, e.g., Run."
},
"activity_movingtime": {
"type": "number",
"description": "Time in seconds the athlete was moving."
},
"activity_avpace": {
"type": "string",
"description": "Average pace for the activity."
},
"activity_avwatts": {
"type": "number",
"nullable": true,
"description": "Average running power in Watts."
},
"activity_haspower": {
"type": "boolean",
"description": "Indicates if the activity has power data."
},
"activity_avhr": {
"type": "number",
"nullable": true,
"description": "Average heart rate in bpm."
},
"external_stress_score": {
"type": "number",
"nullable": true,
"description": "External stress score."
},
"elevation_gain": {
"type": "number",
"nullable": true,
"description": "Elevation gain during activity in meters."
},
"distance_in_km": {
"type": "number",
"nullable": true,
"description": "Distance covered in km."
},
"hrv_artifact_percentage": {
"type": "number",
"nullable": true,
"description": "Fraction of RR measurements that are artifacts in percent."
},
"hrv_artifact_percentage_local": {
"type": "number",
"nullable": true,
"description": "Local artifact percentage for part of the activity."
},
"aerobic_threshold_dfa_alpha1_ramp": {
"type": "string",
"nullable": true,
"description": "Pace where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_ramp": {
"type": "string",
"nullable": true,
"description": "Pace where dfa alpha 1 crosses 0.5."
},
"aerobic_threshold_dfa_alpha1_cluster": {
"type": "string",
"nullable": true,
"description": "Clustered pace where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_cluster": {
"type": "string",
"nullable": true,
"description": "Clustered pace where dfa alpha 1 crosses 0.5."
},
"aerobic_threshold_dfa_alpha1_watts_ramp": {
"type": "number",
"nullable": true,
"description": "Power where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_watts_ramp": {
"type": "number",
"nullable": true,
"description": "Power where dfa alpha 1 crosses 0.5."
},
"aerobic_threshold_dfa_alpha1_heart_rate_ramp": {
"type": "number",
"nullable": true,
"description": "Heart rate where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_heart_rate_ramp": {
"type": "number",
"nullable": true,
"description": "Heart rate where dfa alpha 1 crosses 0.5."
},
"aerobic_threshold_dfa_alpha1_watts_cluster": {
"type": "number",
"nullable": true,
"description": "Clustered power where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_watts_cluster": {
"type": "number",
"nullable": true,
"description": "Clustered power where dfa alpha 1 crosses 0.5."
},
"aerobic_threshold_dfa_alpha1_heart_rate_cluster": {
"type": "number",
"nullable": true,
"description": "Clustered heart rate where dfa alpha 1 crosses 0.75."
},
"anaerobic_threshold_dfa_alpha1_heart_rate_cluster": {
"type": "number",
"nullable": true,
"description": "Clustered heart rate where dfa alpha 1 crosses 0.5."
},
"mean_of_dfa_alpha1_times_power_or_pace": {
"type": "number",
"nullable": true,
"description": "Mean of alpha times pace values recovery metric."
},
"mean_of_dfa_alpha1_times_power_or_pace_normalized_over_two_weeks_in_percent": {
"type": "number",
"nullable": true,
"description": "Normalized mean of alpha times pace values over last 2 weeks."
},
"mean_of_dfa_alpha1_times_power": {
"type": "number",
"nullable": true,
"description": "Mean of alpha times power values recovery metric."
},
"mean_of_dfa_alpha1_times_power_normalized_over_two_weeks_in_percent": {
"type": "number",
"nullable": true,
"description": "Normalized mean of alpha times power values over last 2 weeks."
},
"aerobic_durability_according_to_dfa_alpha1_in_percent": {
"type": "number",
"nullable": true,
"description": "Drift of alpha times pace in first half compared to second half."
},
"aerobic_durability_according_to_dfa_alpha1_running_power_in_percent": {
"type": "number",
"nullable": true,
"description": "Drift of alpha times running power in first half compared to second half."
},
"average_of_dfa_alpha1": {
"type": "number",
"nullable": true,
"description": "Average dfa alpha 1."
},
"internal_stress_score": {
"type": "number",
"nullable": true,
"description": "Internal stress score derived from dfa alpha 1."
},
"kcal": {
"type": "number",
"nullable": true,
"description": "Kilo calories consumed during activity."
}
}
},
"SwimmingActivityDetail": {
"type": "object",
"properties": {
"activity_id": {
"type": "integer",
"description": "Strava activity ID if imported from Strava."
},
"activity_name": {
"type": "string",
"maxLength": 250,
"description": "Name of the activity."
},
"activity_type": {
"type": "string",
"maxLength": 200,
"description": "Type of swim."
},
"source": {
"type": "string",
"maxLength": 200,
"nullable": true,
"description": "Source of activity import."
},
"fit_file_id": {
"type": "string",
"maxLength": 200,
"nullable": true,
"description": "Name of the fit file from which activity was imported."
},
"activity_date": {
"type": "string",
"format": "date-time",
"description": "Activity start datetime in UTC."
},
"activity_date_local": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Activity start datetime in user local time zone."
},
"activity_movingtime": {
"type": "number",
"description": "Time in seconds the athlete was moving."
},
"strava_workout_type": {
"type": "integer",
"nullable": true,
"description": "Workout type as per Strava, e.g., 1 for race."
},
"activity_avpace": {
"type": "string",
"description": "Average swim pace."
},
"activity_avhr": {
"type": "number",
"nullable": true,
"description": "Average heart rate in bpm."
},
"external_stress_score": {
"type": "number",
"nullable": true,
"description": "External stress score."
},
"internal_stress_score": {
"type": "number",
"nullable": true,
"description": "Internal stress score."
},
"distance_in_meters": {
"type": "number",
"nullable": true,
"description": "Swim distance in meters."
},
"kcal": {
"type": "number",
"nullable": true,
"description": "Kilo calories consumed during activity."
},
"user": {
"type": "string",
"description": "Associated Core User (Foreign Key)."
}
}
},
"RecoveryModel": {
"type": "object",
"properties": {
"data": {
"type": "string",
"description": "stringified object of user's recovery data that can include the keys 'date', 'recovery' (overall recovery in percent), 'external_stress_score' (External Stress Score), 'mean_of_dfa_alpha1_times_power_or_pace', 'recovery_alpha1' (recovery in percent according to DFA alpha 1), 'rMSSD' (HRV), 'resting_heart_rate' (resting heart rate), 'recovery_rMSSD' (recovery in percent according to rMSSD), 'recovery_resting_heart_rate' (recovery in percent according to resting heart rate)."
},
"data_joint_muscle_ride": {
"type": "string",
"description": "stringified object of user's cycling joint and muscle recovery data with the keys 'date' and 'recovery' (cycling joint and muscle recovery in percent)."
},
"data_joint_muscle_run": {
"type": "string",
"description": "stringified object of user's running joint and muscle recovery data with the keys 'date' and 'recovery' (running joint and muscle recovery in percent)."
},
"data_joint_muscle_swim": {
"type": "string",
"description": "stringified object of user's swimming joint and muscle recovery data with the keys 'date' and 'recovery' (swimming joint and muscle recovery in percent)."
},
"user": {
"type": "string",
"description": "Associated Core User (Foreign Key)."
}
}
}
}
},
"User": {
"type": "object",
"properties": {
"user_type": {
"type": "string",
"enum": [
"Cyclist",
"Runner",
"Triathlete"
],
"description": "Type of user: Cyclist, Runner or Triathlete."
},
"units": {
"type": "string",
"enum": [
"Metric",
"Imperial"
],
"description": "Unit system preferred by user."
},
"zones": {
"type": "string",
"description": "stringified object of user's 'Ride' and 'Run' zone upper bounds."
},
"zones_run_power": {
"type": "string",
"description": "stringified object of user's running power zone upper bounds."
},
"hr_aerobic_thresh_ride": {
"type": "number",
"nullable": true,
"description": "Aerobic heart rate threshold for cycling."
},
"hr_aerobic_thresh_run": {
"type": "number",
"nullable": true,
"description": "Aerobic heart rate threshold for running."
}
}
}
}