I was testing my app’s abiity to get the workouts for Today(WOD). Same like previous, i only have workouts on Sept6 and Sept7 (workoutname is same as the date to make it easier to understand)
Is the following expected given that you have indicated that the “server now does this automatically”?
In any case, knowing how the API expects the date, it’s no issue for me to do the “T23:59:59” (Which I am doing now and works)
intervals.icu/api/v1/athlete/{ID}/events?oldest=2021-09-05&newest=2021-09-05
No workouts
It would be great to have the GET /api/v1/activity/{id} endpoint accept several {id}s. My use case is retrieving all activities from /api/v1/athlete/{athleteID}/activities.csv then running them through a classifier to get the activities I want more details for, and I feel grimy calling the GET /api/v1/activity/{id} endpoint in a loop.
Am I supposed to get these from the wellness endpoint?
Actually, is there an endpoint for getting user preferences? I’m missing things like UserWeight / Power Zones (i’m parsing the workout_doc to get this), Metric vs Imperial units? Things like that?
For eFTP and FTP is probably ok to just use the athlete’s current settings for future workouts. For eFTP use the value from the most recent activity. For weight the most recent from the wellness endpoint should do.
You can do GET /api/v1/athlete/{id} to get most info about an athlete including settings for different sports.
Is there any shortcuts to get the most recent (updated) value from any of the endpoints? I really dont want to be parsing thru entire months of data to get eg: userWeight or RestingHR
eg: I just tried the wellness endpoint, if I don’t put in an oldest/newest parameter, it will push close to 2 months of data (could be from the day I signed up? not sure) and the (one) day which I put in my fake userWeight is on Oct-1 for eg. (The other days would be “null” which is correct)
I guess this would apply for eFTP as well.
I tested this and seems like I can get the most recent value from the
GET /api/v1/athlete/{id}
endpoint. Could you please confirm if this is true?
I realised that there are multiple FTP and eFTP involved.
There’s Activity FTP
There’s Settings FTP (which also has indoor FTP)
seems like Settings FTP is used to plan for workouts ( There’s also indoor FTP, but doesn’t seem to be used for workouts creation.)
how is activity FTP derived from?
i tested by purposely changing my settings FTP to 200w but activity FTP maintains at 150w
when I look at the weekly summary popup, it seems like it’s using the Activity FTP.
So my question is, to be in sync,
at the start of the week, when there’s NO Actual rides have taken place, where / which FTP is taken for the summary popup?
The most recent weight and resting HR in wellness is copied to the athlete and visible in /settings. When resting HR or weight is needed for a new day (new activity has come in) then the value from the athlete (/settings) is used but flagged as temporary. If wellness is updated then new new weight and resting HR are copied forward over whatever temporary values already exist.
It’s all a bit complicated and took ages to get right.
I think eFTP and FTP in the week info popup are taken from the most recent activity even if in a previous week.
When an activity is first analysed it is assigned an FTP from whatever has been configured in /settings for the sport. If it is an indoor activity then it gets the indoor FTP. If you edit the FTP on your most recent activity it will also update the one stored on the athlete (/settings). But the reverse is not true. Once an activity gets an FTP that stays unless it is edited.
OK. Thanks. I’m pulliing a PER week data, so I guess if there isn’t an eFTP, i’ll have to
put in NA first
when I get an eFTP, for the week, I’ll store it somewhere
update the Latest eFTP from any latest acitivity from the pulled week and then update the store (and use it moving forward)
for FTP, I agree w/ your approach of using the latest FTP from an (edited or not) activity and then applying it to settings. (This denotes that this would be the athlete’s latest FTP moving forward or “from this day on”).
However, shouln’t it also be true for the reverse, from a “from this point on” perspective? If I update my settings page FTP, it should also reflect in future activities - Next Day (not today if an activity has already been executed for today.)
agree
BTW, I read somwehere that the “Time in zones” are not broken down to Ride / Run / swim /Others and basically combined via the “same zone” numbers? Hence I do not / will not need to separate them like I’m doing for eg: ComplianceDist [Run:10%, Ride, 20%] etc… Correct?
Yes the week info popup combines them all. You can still get time in zones totals for specify activity types on the /totals page.
I am planning to add fitness, fatigue, form, eFTP and related fields to the wellness records. This will make it very much easier to get this data from the API or in CSV download.
Unfortunately not. I need to make the power curve for an activity available through the API. Also an endpoint to pull just specific durations from all activities matching a filter would be nice. I have had this on the todo list for a long time for the front-end, will add the API endpoints when I get it done.
Hi David. My application enduroco.in connects using this wonderful API and generates workouts for users. I face an issue that every time an athlete does an FTP test he has go into intervals settings and update. I want to automate this process. Is there an API that can be used for updating all the threshold numbers for an athlete. Thank you.