Hi,
I'm about to create a small stand alone java application to execute basic queries against our Jira server. I did not find any examples how to do that.
What I'm expecting is a kind of connection object, where I can set up all the necessary settings like host, port, username, password.
So basically I just want to connect get an issue by id, check its fields, or something like that. Play around with that.
This would be extremly helpful before I do my plugin development, because I could test my code very quickly, get used to the api, debug the code locally, etc.
Is this doable?
Apprectiate any help,
LACi
You can use the REST Api and use requests like http://example.com:8080/jira/rest/api/2.0.alpha1/issue/{issueKey} to get information about issues. I like this since you can prototype your requests rapidly in the browser.
Or you use the SOAP API which takes a little more effort since you first have to create your WSDL. Here is a nice Blog how to use it: http://www.j-tricks.com/1/post/2010/8/jira-soap-client.html
Ok, i understand your question better now. To speed up the development process, please check this
That way you avoid the annoying Tomcat restart. Works nicely!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot! That atlas-cli looks promising. Also the REST API can come in handy if I want to quickly check something.
So it seems what I originally wanted is not doable, namely to connect to the JIRA server from my own standalone app.
Not a big deal, I'm totally fine with these workarounds, just good to know.
Thanks,
LACi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick response, but I think this is not what I'm looking for.
I want to create a java class file with my own main method, where I could use the API to connect to Jira and do some operations. I want to query an issue, check it's fields, maybe acces some custom fields, things like that.
I'm in a development of a custom field type plugin, but at first I want to see how my code works in a basic test app. I don't want to re-run always the atlas-run to see the effect of my code change. It's just too time consuming. Also from a standalon app I could easily debug my code.
For example I want to see the result of a code like this:
// get the Priority PriorityImpl priority = (PriorityImpl)issue.getPriorityObject(); String priority = priority.getName(); // get the Severity CustomField severity = ComponentManager.getInstance().getCustomFieldManager().getCustomFieldObject("customfield_10182");
That's the rational behind this question.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems I would need to connect to a JIRA server again from a standalone application through the API.
Is this possible? Could someone please confirm this?
I want to play around with the JQL API to see how it works. I don't want to install any plugin to at this point I just want to test the API functions with real data.
What should I do?
Example code:
ParseResult pr = searchService.parseQuery(userUtil.getUserObject(adminUserName), "\"Project Team\" = \"wpo\" and issuetype = Bug"); Query query = pr.getQuery(); SearchResults searchResults; Collection issues = new ArrayList(); try { searchResults = searchService.search(userUtil.getUserObject(adminUserName), query, PagerFilter.getUnlimitedFilter()); issues = searchResults.getIssues(); } catch (SearchException e) { // TODO Auto-generated catch block e.printStackTrace(); }
Thanks,
LACi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.