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

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 Leaders.
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!

Suggest an answer

Log in or Sign up to answer