I have to apologize. In so many situations, the issue was sitting in front of the screen. With too much refactoring I introduced a check too much. Could solve it in the meantime. Stuff works.
The set of APIs exposed from ICU is pretty amazing. Really! Thanks.
Background: I am not that happy when changing the HR-Zones, that all historical LTHR could not be simply kept. For this reason a script does the job to correct them.
I assume that it’s like this because FTP and Threshold Pace should change much more often than LTHR, but I think that it should be kept for previous activities if there’s a need to Re-analyze (e.g. to compute a new field).
@david any plans for exposing all events from ICU also as CSV via API? (like we have with wellness or the activities) That would be nice and very helpful in many situations for others as well to either use it for programmatically further usage or to simply get an overview of all events in a list. Many thanks.
I thought you might be interested in as I made some step to fix it, but there is still sth weird and buggy. Handling NULL values seems to be issue when I look to my results in the table. It does not skip them and just copy from the one before. I assume the issue is being caused at function parseJSONObject_, during transformData_ the NULL values are not considered, but I stuck from there solving it.
I have just updated my post. Must have been half asleep before. Doing “Update Zones” does change LTHR. Probably not the best decision but on the other hand it isn’t something that changes much.
Re-analyze does not change zones, LTHR, FTP or threshold pace. All history is kept.
When endpoint GET /api/v1/athlete/{athleteId}/activities returns an empty array, the response doesn’t have content-type header. If the response returns a non-empty array, content-type is present.
Could you fix it, and add header for all cases?
Authentication Type: API Key
Client ID: API_KEY This text and not your apikey!!
Client Secret: Your Apikey found on the Intervals settings page
Authorization URL: https://intervals.icu/api/v1/athlete/AthleteID/activities.csv Where AthleteID is your ID found on the intervals settings page
In my application i would like to convert workout step target from zone to actual ftp percentage (Z1 = 0% - 55%).
I’m thinking to use zoneTimes field from endpoint api/v1/athlete/.../events it has perfect zone description
My question, is it ok to use it or there is different rest endpoint which can return zone description?
If current one is ok, could you please add additional object to zone description, which contains percentage range not in string, but in int values. e.g.
If you add resolve=true then all the workout step targets will be expanded into actual watts/bpm/pace values using the athlete’s zones and other settings.