Here are the endpoints for lactate threshold and functional power threshold #216
Unanswered
AnonJohn
asked this question in
Request for new data or new endpoints
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi — I sleuthed a couple more end points. Documenting them here. Not quite sure the optimal model for including in underlying code. They are things that go together but have different "GET" requests. garminconnect seems to treat all endpoints independently, but these are connected.
There are also differences in what gets included in the single day request vs multi-day requests.
If this is useful I'll do health snapshots next. They are in a separate activity feed from other activities.
Part 1: Single day requests
garmin = garminconnect.Garmin(email, password)
Note: Single day includes FTP and power to weight in a single call instead of separate ones. It calls the lactate threshold power for running activities FTP.
powerToWeight = garmin.connectapi(
f"biometric-service/biometric/powerToWeight/latest/2024-07-09/",
params={"sport": 'Running'}
)
print(json.dumps(powerToWeight, indent=4))
Note: Includes LT speed
latestLactateThreshold = garmin.connectapi(
f"biometric-service/biometric/latestLactateThreshold"
)
print(json.dumps(latestLactateThreshold,indent=4))
Part 2: Multi-day requests
startdate = today - timedelta(days=7)
FTP
URL = f'biometric-service/stats/functionalThresholdPower/range/'
ftp = garmin.connectapi(
URL + startdate.isoformat() + '/' + today.isoformat(),
params=params
)
print(json.dumps(ftp, indent=4))
Power to weight
URL = f'biometric-service/stats/powerToWeight/range/'
params = {'aggregation': 'daily', 'sport':'Running'}
powerToWeight = garmin.connectapi(
URL + startdate.isoformat() + '/' + today.isoformat(),
params=params
)
print(json.dumps(powerToWeight, indent=4))
LTHR
URL = f'biometric-service/stats/lactateThresholdHeartRate/range/'
params = {'aggregationStrategy': 'LATEST', 'sport':'RUNNING'}
LTHR = garmin.connectapi(
URL + startdate.isoformat() + '/' + today.isoformat(),
params=params
)
print(json.dumps(LTHR, indent=4))
LT pace / speed
URL = f'biometric-service/stats/lactateThresholdSpeed/range/'
params = {'aggregationStrategy': 'LATEST', 'sport':'RUNNING'}
LTSPEED = garmin.connectapi(
URL + startdate.isoformat() + '/' + today.isoformat(),
params=params
)
print(json.dumps(LTSPEED, indent=4))
Beta Was this translation helpful? Give feedback.
All reactions