Trainings / My Trainings / Delete

Hello,

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

Best Regards

Torsten

Parents
  • 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"
    });

Reply
  • 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"
    });

Children
No Data