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: 

How to execute a search in a REST plugin

David Webb
April 5, 2014

Does anyone have an example of how to execute a non-anonymous issue search using the SearchService from within a JIRA REST plugin? All the examples are for anonymous access.

I need to be able to perform a non-anonymous search, so need a user object to pass into the search.

The REST api will be called from within a Gadget plugin.

How do I do this?

Thanks

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
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.
April 5, 2014

You can retrive the current user from JIRAAuthenticationContext, assuming the user is logged in when he access the gadget. If not, you might want to find one of the users using UserUtil and use that object.

David Webb
April 6, 2014

Genius, thanks very much!

TAGS
AUG Leaders

Atlassian Community Events