This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bulk delete all the body weight data from Garmin Connect

Is there a way to bulk delete all the body weight (or any body measurement) entries from Garmin Connect? Possibly using Java Script?

I just imported eight years of weight data into Garmin Connect from FitBit, but entered them by mistake as kg instead of pound. :(( Now, I have 700+ entries to delete.

When I contact Garmin Chat Support, they say that they cannot delete any data from their end.

cheers,

Arpat

Top Replies

All Replies

  • Possibly using Java Script?

    Yes, if you are able to code in JavaScript, then have a look at some of the threads discussing bulk operations, listed at the right of this page. Or look up more of them in the forum - it is a frequently reocurrent topic, with plenty of creative solutions proposed by other users, so you can take the inspiration in some of them, if you do not find the exactly matching solution.

  • I can understand the suggested codes for querying the activity data, but I have no idea how to do it for the body measurement entries.

  • Try posting to one of the threads discussing bulk scripts (preferably a recent one) - the authors of the solutions may give you some tips for your situation.

  • The same as for activities (Loaded rides by mistake) or workouts (Trainings / My Trainings / Delete), only change to weights and the delete request is slightly different. And there are more nesting levels, I'm not really using the weights, so you can check if that's all.

     

    This lists Weights (F12 console) in range 2021-01-01 to 2021-01-30:

    jQuery.getJSON(
        'https://connect.garmin.com/modern/proxy/weight-service/weight/range/2021-01-01/2021-01-30?includeAll=true',
        function(weights_list)
        {
            weights_list['dailyWeightSummaries'].forEach(
                function(day)
                {
                    day['allWeightMetrics'].forEach(
                        function(w)
                        {
                            console.dir(w['samplePk'], w['calendarDate'], w['weight']);
                        }
                    );
                }
            );
        }
    );

     

    Deletion request can be added inside, but at first - quadruple check if a search script returns correct results. Only then add deletion.

    fetch('https://connect.garmin.com/modern/proxy/weight-service/weight/' + w['calendarDate'] + '/byversion/' + w['samplePk'],
    {
        "headers": { 'NK': 'NT' },
        "method": "DELETE"
    });

  • Thank you very much for this. I ended up automating a macro in iMacro and let it run through the weight pages. It was ugly slow, but it worked. Nonetheless, I'll definitely study your code, and I'm sure there will be others using it.

  • Unfortunately this doesn’t work anymore.

    Any hints how I can update adapt this?

  • Listing works as before, but deletion request currently needs also 'NK':'NT' header. I added it now.