Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can you bulk add watchers to blog post?

Jeremy Price July 12, 2019

When viewing a blog post within a Confluence space, you only have the one option of "watch this Blog". Whereas on pages and spaces you can click on the "watch this space" option and add multiple users to watch the space or page all at once.

 

Is there something I can possibly do through an API call that might allow me to add a couple hundred users to watch a blog post? 

 

Currently the only way is to make every user go to that specific page and watch the blog. Which can be a daunting task when you have hundreds of users that would have to do this action.

1 answer

1 accepted

0 votes
Answer accepted
Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 13, 2019

Dear @Jeremy Price ,

I think not possible out-of-the box. But If you have a list of user logins you could do with  small script from outside via REST API:

https://docs.atlassian.com/atlassian-confluence/REST/6.6.0/#user/watch-addContentWatcher

Let me know if this could work for you - I can assist in scripting.

So long

Thomas

Jeremy Price July 15, 2019

Thank you for your response. Something like that would work as I'm just looking to add multiple users to watch the blog space and nothing more. 

If you have time I would appreciate your help in the scripting portion, as I'm not too well versed in making that myself. 

Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 15, 2019

Dear @Jeremy Price ,

to add a single user (watchman) as a watcher to a page with id 123456:

curl -X POST https://my.confluence.net/rest/api/user/watch/content/123456?username=watchman -H "Content-Type: application/json" -H "X-Atlassian-Token: no-check" -u admin:pass

The user "admin" needs administration privileges for the space. Now you just need to wrap a "for" loop around so that you can add multiple watchers to one page or multiple users to multiple pages. :)

So long

Thomas

Jeremy Price July 16, 2019

Thank you for this, I will test it out on a blog page and see if I can add more than one user at once to a blog page;. Thanks again. 

David_Henriksson April 13, 2023

Hi!

The above solution is for a particular blog post if I understand it correctly. Is there a way to bulk add users to watch the entire blog aswell? I cannot find any REST endpoint for that. I can find an AJAX action (addspacenotification.action) but seems not to be possible to input multiple users on that action (only logged in user by default). 

watchThisBlog.PNG

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events