java - Connect JIRA and retrieve Information -


i have task retrieve information jira account through java. downloaded jira api working java, have no idea how make work. have pass somewhere username , password log in , after retrieve information want project want.

jirarestclientfactory factory = new asynchronousjirarestclientfactory(); uri uri = new uri(jira_url); jirarestclient client = factory.createwithbasichttpauthentication(uri,  jira_admin_username, jira_admin_password);  // invoke jrjc client promise<user> promise = client.getuserclient().getuser("admin");   // here getting error!! user user = promise.claim(); ///////////////////////////////////////  // print result system.out.println(string.format("your admin user's email address is: %s\r\n", user.getemailaddress()));  // done system.out.println("example complete. exiting."); system.exit(0); 

that above code not working, because either if pass wrong password , wrong username showing me same result. have know how connect jira , retrive information in json there! thank time!

here error

caused by: com.atlassian.jira.rest.client.api.restclientexception: org.codehaus.jettison.json.jsonexception: jsonobject text must begin '{' @ character 9 of  

i think don't have necessary permission acces jira , have connect jira account have correct permissions!


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -