Most users experienced new activities from Garmin not syncing up with ConnectStats since last week (March 23rd or so). As described in the last post, it can be fixed by using an alternative API.
It looks like it’s going to be a permanent change. It also has some minor consequences for users.
What is the alternative API?
It’s probably obvious to most of you, but the API is the mechanism that third party (ConnectStats) can use to access the data stored by a provider (Garmin or Strava).
Garmin a long time ago had a public API to access the activities recorded in Garmin Connect. Back in 2014, Garmin decided to change it’s approach to third party. While the old API allowed a third party to access directly the running or cycling data from Garmin servers, they decided to switch to a push approach. The key consequence is that a third party now has to build and maintain an infrastructure to store the data in the cloud after it was pushed by Garmin. This is great for a platform like Strava, it makes for a great user experience. But it’s impractical for small independent hobbyist developers like myself with ConnectStats like app.
While Garmin announced they would deprecate the old API in 2014, in practice until last week it continued to work more or less. It just had regular tiny changes, which beside the fact that the change came as a surprise outage to developer via lots of sudden bug reports, they were usually easy to keep up with.
The old API continued to work and was used by their own Garmin Connect website. since they upgraded their website to the new look shortly after the API announcement, they also slowly started to upgrade the site to a very different API. This is what the settings “Alternative API” refers to.
Practical Difference between the two API
ConnectStats downloads data in two stages. The first is to get a summary of all recent activities, which is intended to be faster. Then when you go and look at an activity in details, it will downloads all the individually recorded data point to create the graphs and the track on the map. The details can be a lot of data, so it’s an optimisation to only download the summary first.
The main difference between the two APIs, is that the new one (alternative) contains a lot less information in the summary. Using the new API, a lot of the extra information (for example: running dynamics, min and max, etc) will only be downloaded while getting the full detail of the activity. It’s not a major issue, as in practice when you select an activity, you need to wait a bit for the graphs and map data anyway.
Where it can impact the user experience is in some of the historical statistics pages. Some historical statistics on the extra information will be missing until each activity detail is downloaded. To mitigate the issue, ConnectStats tries to automatically download the last dozen or so activities that are missing detail.
Will the old API come back?
Only Garmin knows. But at this point I would anticipate it won’t. ConnectStats lived on borrowed time since 2014 when they announced they would deprecate the API.
Also the behaviour of the old API is not that it errors, but it contains a lot less data (almost none). In the past changes, it always was either some error, or some subtle change that broke ConnectStats use of the API. This time feels different.
What’s next?
I am releasing a new version of ConnectStats (4.3) that will by default use the new API. I keep the setting to switch back, in case things change in the short term and to keep optionality.
As in all the previous discussion on API change, I also continue to prepare for a day when Garmin may completely shutdown the API ConnectStats uses.
At such time the only option to continue using ConnectStats will be to switch to another service provider like Strava.
Using Strava data though has the drawback that it contains a lot less details on each activities (no running dynamics, etc).
Alternatively, now the the app is open source, if it comes to that we may link it to other service and hopefully the app will continue to live.
Thank you Brice for your efforts and for keeping us users informed. This is a fabulous app and I’m hoping it will continue for many years!
Hello. Thanks for short updating. Updating again but for swim, the lengths aren’t displayed anymore.
Thanks for keep investing tour time in this! I know how tedious it is as a SW developer to play such game with a large provider who ignores what the users want.
As a thought: AFAIK Tapiirik, possibly others, sync the FIT file to cloud storage, Dropbox if I remember correctly. ConnectStats could also pick those up I guess.
Thanks for a great app! And thanks also for your efforts to keep up with the API changes from Garmin!
One change that I noticed when switching from old to alternative API Is that I no longer get to see the VO2 scores for a run. Is this a known side effect?
I didn’t know, but I will check if I can find it in the new api somewhere.