As you got it working, it's good.
Anyway it's also possible to use similar script in web-browser console (F12 key), so here is my script, tested in Firefox. Edit the search link to filter activities…
You could delete all your activities, insure the default privacy setting in you account settings is what you want it to be, then upload all your activities again.
OK, it works now. If you replace lines 236 to 269 from the script above with lines 219 to 257 from this script (that seems more updated): https://pastebin.com/m48rwsae it works perfectly. I have tried and I could change last two months of activity privacy for me.
Thanks WillNorthYork this script is super helpful!!! I wish I could do similar things with python
As you got it working, it's good.
Anyway it's also possible to use similar script in web-browser console (F12 key), so here is my script, tested in Firefox. Edit the search link to filter activities you want to change - and change typeKey to privacy level you need.
Below it's limit=1 for testing if it works as wanted, it will change only first latest activity to private.
It's normal search link from Connect Web, so it accepts all filters visible on the website, if you need more filters just check them on the website and add them by &.
jQuery.getJSON( 'https://connect.garmin.com/modern/proxy/activitylist-service/activities/search/activities?limit=1', function(act_list) { act_list.forEach( function(act) { 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': '{"accessControlRuleDTO":{"typeKey":"private"},"activityId":' + act['activityId'] + '}', 'method': 'POST' }); console.dir(act['activityId'], act['activityName'], act['startTimeLocal']); } ); } );
Parameters:
typeKey: private, subscribers, groups, public ?limit= number of activities to change, starting from latest &start= start from nth+1 activity, counting from latest &activityType= running, cycling, fitness_equipment, walking, other &startDate= YEAR-MM-DD &endDate= YEAR-MM-DD &minDistance= in meters &maxDistance= in meters
Example:
.../search/activities?limit=200&start=200&activityType=running
Hi Travis. The links to your script seem to have disappeared from the thread.
Is it still available somewhere?
TIA!
This is gold! Amazing stuff, thanks BunBun! !!
Hey, WillNorthYork, 2 years later and I found great your idea. I don't know why didnt worked for me, could you help me?
I'm getting the same error. It would be sweet if we could get this working.
Updated with your tip and working https://pastebin.com/Tnhi8YWj
Thanks