API access to Intervals.icu

After updating Strava and resyncing in Intervals, things are looking a lot better now. Thanks for all your help David

1 Like

Not at the moment. I hadn’t thought about 24x7 metrics. Quite a few services do delivery such stuff but Intervals.icu only uses the summary data for the day. I would need to poke around and see how space efficiently such data could be stored. If it is only every 15m or something then it would be possible.

Based on the current API design, it could be an another type of custom item, and then a way to submit the data via Wellness API like endpoint.

In regards to the actual data, I was planning making a Garmin Connect IQ app which can submit health data (it’s available with user’s permission) to the API endpoint

@david has the ListActivities API response changed when the activity originates from Strava? (Actually my activities originate from other apps that are collected in Strava)

https://intervals.icu/api/v1/athlete/xxxxx/activities?oldest=2024-11-03&newest=2024-11-10

I’m now seeing this response from the API which is different from a couple of days ago

{
        "id": "12847086233",
        "icu_athlete_id": "xxxxx",
        "start_date_local": "2024-11-07T18:53:20",
        "source": "STRAVA",
        "_note": "STRAVA activities are not available via the API"
    }

I know you mentioned somewhere that you didn’t want people proxying activities via Intervals.icu, but having to create two integrations; one for Intervals.icu and one for Strava is going to be a real pain

Is there any way I can source Activities without having to create a Strava integration too? Thanks

1 Like

Looks like this is the way moving foward with the new Strava updates on their T&C. No “Proxying” of the data from Strava via other sites.

Will just have to show users that this is the new “error” and why it’s happening and persuade them to drop strava (provided they have a choice)

You need to try get the Strava stuff into Intervals.icu directly from the system it originated on instead of going via Strava. Unfortunately that is the only way.

Ok understood.

If there is an integration between Wahoo and intervals, i would use it over Strava - I’ve just cancelled my paid subscription with them (Strava).

Btw @david could you modify the get activities API to provide the non Strava data which i presume are the icu_… prefixed ones? My assumption is that because there are calculated by Intervals, it doesn’t prevent you making those available.

If you can that would be amazingly helpful rather than my having to reinvent the wheel to calculate HRTSS or TSS for example

Thanks!

As FYI to those facing this new challenge. This is the data returned from the Intervals.icu API on activities which are solely transferred to Intervals.icu from Strava.

(T&C From Strava forbids sites from proxying “THEIR??” data from Strava API to other services)

I’m working to code to show an error message to the user noting why they’re not seeing their data.

The Strava restriction appears to affect many of activity related Intervals APIs:

https://{{server}}/api/v1/athlete/{{id}}/activities
https://{{server}}/api/v1/activity/{{activityid}}
https://{{server}}/api/v1/activity/{{activityid}}/power-histogram
etc …

:frowning:

I’m able to retrieve my activity data from Strava using their API but it is a hassle getting all the OAuth stuff to work, and having a token that needs refreshing every 6 hours

I still think that there is a significant delta between what Strava returns, and what the original https://{{server}}/api/v1/activity/{{activityid}} API returned. It would be great if @david is able to reinstate all of the non Strava fields; specifically those that are computed in Intervals or sourced elsewhere like the weather for example

        "average_weather_temp": 9.957777,
        "min_weather_temp": 9.949999,
        "max_weather_temp": 9.969877,
        "average_feels_like": 8.561321,
        "min_feels_like": 8.486321,
        "max_feels_like": 8.6098,
        "average_wind_speed": 1.246676,
        "average_wind_gust": 2.8502395,
        "prevailing_wind_deg": 90,
        "headwind_percent": 19.877048,
        "tailwind_percent": 17.008196,
        "average_clouds": null,
        "max_rain": null,
        "max_snow": null,

:crossed_fingers:

I have to be very careful here or Intervals.icu will lose access to the Strava API. Lots of people are still getting activities via Strava.

I have opened the weather summary endpoint for Strava activities.

2 Likes

Completely understand your pov and certainly don’t want to risk loss of access.

Thank you for making the weather data available :bowing_man:

Do you feel comfortable creating a new endpoint (say) /v1/getIntervalComputed/{{activityid}} that is able to return the following fields (which do not exist in the Strava activity and originate from Intervals or are computed in Intervals):

icu_rolling_ftp
icu_rolling_ftp_delta
icu_atl
icu_ctl
icu_ftp
icu_hr_zones
icu_resting_hr
icu_weight
icu_power_zones
icu_sweet_spot_min
icu_sweet_spot_max

Thank you

you can get these data from the other endpoints

/v1/athlete/(athleteId)/wellness
icu_atl
icu_ctl

/v1/athlete/(athleteId)
sweet_Spot_x
weight
zones
resting_hr

I have reworked my app to show these messages to the user. Will be adding a link to the forum thread.

1 Like

Thanks for the tip - I knew about the wellness endpoint which I presume is a daily summary.

What I was really after was the actual training load for the (ride) activity in question if it’s possible to get.

Some time in the last 2-3 days the API has stopped returning most recent data. When I call the API to retrieve data, it is returning data from 3 months ago and even then, some data is missing in that time period. Not sure how to troubleshoot on my end. Nothing has changed with my logic. No error messages. Simply returning out of date information.

Using the endpoint: https://intervals.icu/api/v1/athlete/xxxxx/activities.csv

Any suggestions on how to troubleshoot this?

Where is the source of your data? Zwift? Garmin? Strava?

Strava.

I should mention all activities are displaying fine in the main view. It is only the api response that is incomplete.

This is (the new) normal.

if this is your issue right now, and you cant get any other data (like above thread) then thats likely the case and i’ll close this thread. If not, do tell and i’ll merge the thread with the above topicandbfind out whats what

tx

Thanks for the clarification. Unfortunately, my source app (iOS WorkOutdoors) does not have any other export option beyond Strava.

You have a couple of choices, nothing which is easy as far as I can tell.

  1. Manual Download from Strava → INtervals
  2. Discuss w/ the Developer
  3. Get a 3rd Party App (RunGap / HealthFit). I can’t recommend BreakAway as it currently doesn’t get data from within Apple Health → Intervals (It currently only does Wellness data & writes completed workouts to Apple Health)