download fit file from web link?

Good afternoon,

I am a physics professor and am working with a student on her honor's project.  She wants to collect Garmin data from participants in a local 5K so that she can analyze differences in performance. 

Other users can share data from events on their news feed via weblink, and these weblinks provide the detailed data.  However, that data is not easily accessible for our purposes. We really need the FIT files to get the spreadsheet that contains all of the data.  As of now, I think the only way to get those FIT files is to have the user open their Garmin account, download the FIT file for an event, and email that file to us. Since we are gathering data at the site of the 5K, I fear that users will not be able to go through this many steps even if they are willing to share their data with us. 

Is there a way to download the FIT files from these shared web links?  

Garmin, can we get a link to the original FIT file on the pages connected via these weblinks?

Thanks

Chad 

  • Is there a way to download the FIT files from these shared web links?

    No, but you can use the JSON data accessible through browser's DevTools. It contains most of the data, and additionally it is in human readable format, and can be easily converted to a number of other formats. If you have any coder on your team, with some basic knowledge of JavaScript, it will be an easy task. I'd tell easier than parsing the FIT files.

    Garmin, can we get a link to the original FIT file on the pages connected via these weblinks?

    Garmin does not answer any posts here. This forum is set up for suggesting ideas to 3rd party Connect IQ developers. You can contact Garmin's Support directly through their website at https://support.garmin.com, but frankly told I highly doubt they would ever allow the direct download of FIT files by anyone else than the owner.

  • Thanks trux!  I'll check with some of the programmers at our University. Do you know if I can also gather the GPX data (with positional info) from the JSON?

    Thanksl
    Chad

  • Hey Trux,  thanks so much for your reply!  I'm checking with some of our math faculty, to see if they can help.  I'm a decent (not great) programmer, but I've never done anything like this...can you direct me to some resources? 
    Thanks,
    Chad

  • BTW, this is an example of a link that I'd like the data for:

    https://connect.garmin.com/modern/activity/16769408439?share_unique_id=11

    The graphs show pace, heart rate, etc....I'd like to have that data in a CSV format.

  • Do you know if I can also gather the GPX data (with positional info) from the JSON?

    All coordinates are in the JSON data in a human readable form (see below). However, if for some reason you need the data in GPX format, you can simply save the shared activity as Course, and then export the course as GPX:

         

    As for the JSON data, in fact you do not need to be a coder at all. It is rather a trivial task to process the data in the way you need. JSON format is very easy to work with, and there are also countless tools (including JSON to CSV convertors) and tutorials available online for such task, so you do not need to be any experienced coder. Some very rudimentary knowledge of data structures and computing logics, common sense, is all you need. Any high school graduate should be able doing it, so I guess an university student in physics won't have any problems with it.

    Simply open DevTools when on the activity page, reload the page, go to the Network tab, enter "details" into the search box, and you get the JSON data file on the Preview tab. Use the Response tab for copying and pasting the raw data to any external editors or tools.

    All data (including the GPS coordinates) is in under the node "activityDetailMetrics" and the description of individual fields is under the node "metricsDescriptors". Please note that the order of the descriptors is random, and usually differs at each reloading of the page!

    As for the JSON to CSV conversion, there are countless of tools available, and also  many spreadsheet and database programs can read JSON data directly. I use for example the tool at https://www.convertcsv.com/json-to-csv.htm, but as I told there are countless other possibilities and some of them may be more suitable for your purpose.

  • Trux,

    That is very helpful. I'm able to get the data into a usable format.  My student and I are so grateful for your input.

    Chad