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

Trainings / My Trainings / Delete

Hello,

is it possible to mass delete Trainings from "My Trainings"?

Best Regards

Torsten

Top Replies

All Replies

  • Do you mean Training » Workouts in Garmin Connect Web (you are posting to the forum of Garmin Connect Web), or are you trying to delete workouts from the watch?

    In the later case, connect the watch over the USB cable to a computer, and delete the files in the folder //GARMIN/Workouts/

    If you meant the GC web interface for Workouts, then you can delete individual workouts after clicking the triple dot symbol righ on the row. Mass deletion is not available, but it you really have a huge number of workouts to delete, it might be worth of doing it through the JavaScript console, though unless you know how to code in JavaScript, you'd need to ask someone to write the snippet for you. User posted couple of similar snippets for diverse mass operations earlier in the forums here, so perhaps he already has written one for this too.

  • The same as for activities (Loaded rides by mistake), only change to workouts.

     

    This lists Workouts (F12 console), limit=2 shows 2 workouts:

    jQuery.getJSON(
        'https://connect.garmin.com/modern/proxy/workout-service/workouts?limit=2',
        function(wo_list)
        {
            wo_list.forEach(
            function(wo)
                {
    				console.dir(wo['workoutId'], wo['workoutName'], wo['sportType']['sportTypeKey'], wo['updateDate'], wo['createdDate']);
                }
            );
        }
    );

     

    Deletion request can be added inside, but at first - add an if check to limit results, by date or name etc. and quadruple check if a search script returns correct results. Only then add deletion.

    fetch('https://connect.garmin.com/modern/proxy/workout-service/workout/' + wo['workoutId'],
    {
        "headers": { 'Accept': 'application/json', 'NK': 'NT', "X-HTTP-Method-Override": "DELETE" },
        "method": "POST"
    });

  • I mean't in web page.

  • Yeah, I've got to get better at scriptiong and json...  Tools of the modern age.