Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I bulk update what spaces I am watching?

Christian Olivares
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 23, 2025

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! 

3 answers

2 votes
Michael F Kelly Jr
Contributor
April 23, 2025

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.

Screenshot 2025-04-23 at 2.32.27 PM.png
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>'

 

https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches/#api-wiki-rest-api-user-watch-space-spacekey-delete 

0 votes
Alastair Wilkinson
Contributor
May 6, 2025

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.

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 5, 2025

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. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events