The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

List of all watched questions using REST API

Berry Kersten
Contributor
June 16, 2020

Hi, 

I have a use case where I want to query all watched questions for a specific user (using the REST API), but I'm not sure how to do this.

For example: all watched questions for user sysadmin

https://www.someurl.com/rest/api/latest/search?type=question&cql=watcher+=+sysadmin&maxResults=100&startAt=0

The result is not satisfying as it also displays pages.

Ideas anyone?

Thanks!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Lasse Langhorn
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 Champions.
June 16, 2020

Hi @Berry Kersten 

I have not played with Questions for Confluence as I assume that is what you are using.

According to the Confluence REST API field reference for type question is not supported but then I guess this type will be available when this module is installed in Confluence.

But have you tried something like this where you omit the type parameter?              

https://www.someurl.com/rest/api/latest/search?cql=watcher+=+sysadmin+and+type!=page&maxResults=100&startAt=0
Regards

Lasse Langhorn

Berry Kersten
Contributor
June 17, 2020

Hi @Lasse Langhorn Thanks for your reply!

Correct, I'm using Questions for Confluence (and the corresponding documentation on https://docs.atlassian.com/confluence-questions/rest/resource_SearchResource.html)

Based on your answer I've tried the following:

https://www.someurl.com/rest/questions/1.0/search?type=question&cql=watcher+=+sysadmin&maxResults=100&startAt=0Regards

And this still does not seems to work as it's returning questions I'm (sysadmin) not watching.

TAGS
AUG Leaders

Atlassian Community Events