For some reason I have been added as a watcher to multiple spaces and I am receiving email notifications, around 50 per day which is non essential information for me. This reduces my visibility in important email and important confluence spaces I do want to watch.
Is there a way I can bulk update what I am watching to remove all spaces at this moment?
Thanks!
You can go to 'https://your-domain.atlassian.net.atlassian.net/wiki/spaces?spaceType=watching' while logged in and then just run thru unchecking the eye "watching" icon for the ones you don't want.
Or you could build a script if you really wanted to, using the api call to get a list of spaces you're watching and then iterate over that list with a delete call.
curl --request DELETE \ --url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/space/{spaceKey}' \ --user 'email@example.com:<api_token>'
Hello Christian,
As others have suggested, you can write a script to remove yourself as a watcher, among many other features of ScriptRunner for Confluence Cloud.
It's also possible to set up a listener that would help maintain your sanity through automation, should this problem ever arise again.
It's not clear if you are an admin on your Confluence instance, but if so, ScriptRunner allows you to create complex automations, custom macros and custom scripts to tailor Confluence, whatever your business needs are.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's a script to remove all your space watches.
While you are logged into Confluence and have any page loaded, load your browser console (Press F12 and choose the console tab) and paste in the following code and press Enter:
const getSpacesUrl = `${contextPath}/api/v2/spaces?type=global&limit=250`; const getSpaces = (url) => { $.ajax({ url: url, success: (spaceData) => { for (space of spaceData.results) { getWatchStatus(space); } if (spaceData._links.next) { getSpaces(spaceData._links.next); } } }); } getSpaces(getSpacesUrl); const getWatchStatus = (space) => { $.ajax({ url: `${contextPath}/rest/api/user/watch/space/${space.key}`, success: (watchData) => { if (watchData.watching) { removeWatch(space); } else { console.log(`Not watching space ${space.name}`) } } }) } const removeWatch = (space) => { $.ajax({ contentType: 'application/json', type: 'DELETE', url: `${contextPath}/rest/api/user/watch/space/${space.key}`, success: () => { console.log(`Space watch for space ${space.name} removed`); } }) }
It will run through all the spaces and remove any spaces you are watching. Once your console is silent for a while the process should be complete.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.