It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What is an API to get list of all spaces that current user is watching?

What is an API or cql to get a list of spaces that the current user is watching?

1 answer

Hi @Anuja Deshpande,

have you tried this:

https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=watcher=currentUser()

EDIT: Oh, this returns all pages the user is watching, not all spaces. I'm not sure whether you can actually get all watched spaces directly. But maybe you can use the result of this CQL, to gather all spaces that the current user is watching pages in and after that check all the spaces against the space watchers API. But then you could also probably just get all spaces and loop over them directly. Might even be faster, depending on the amount of spaces.

Cheers,
Sven

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

8,367 views 6 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you