Hi , I just want to change everything I have stored as "Cycling" to " Road Cycling" and leave everything else as it is. Suspect some wiz might know how to do this.
Hi , I just want to change everything I have stored as "Cycling" to " Road Cycling" and leave everything else as it is. Suspect some wiz might know how to do this.
As in this thread: How to batch edit uploaded activities?
Just change a type and add IF to edit only cycling.
Like this. Change limit as needed, but better test it on smaller number to be sure if it works as you want.
jQuery.getJSON( 'https://connect.garmin.com/modern/proxy/activitylist-service/activities/search/activities?limit=1', function(act_list) { act_list.forEach( function(act) { if (act.activityType.typeKey === 'cycling') { fetch('https://connect.garmin.com/modern/proxy/activity-service/activity/' + act.activityId, { 'headers': { 'Content-Type': 'application/json', 'NK': 'NT', 'X-HTTP-Method-Override': 'PUT' }, 'body': '{"activityTypeDTO":{"typeKey":"road_biking"},"activityId":' + act.activityId + '}', 'method': 'POST' }) console.dir(act.activityId, act.activityName, act.startTimeLocal) } }) })