I've been attempting for days on how to authenticate using login credentials and trying to retrieve specific JSON data for transitions in Jira. Can someone please help me with this one? If anyone can give me any pointers on what library is easiest to use and how I can I easily parse the JSON. Thanks!!!
String username = "username";
String password = "password";
Authenticator userAuthenticator = new Authenticator(username, password);
String client = ClientBuilder.newClient()
.target("http://jira.corp.local:8080")
.register(HttpAuthenticationFeature.universalBuilder()
.credentialsForDigest(username, password)
.build())
.path("/rest/api/latest/issue/ORI-5714/transitions?expand=transitions.fields")
.request(MediaType.APPLICATION_JSON)
.get(String.class);
System.out.println(client);
First question to ask is whether this is a cloud or server version of Jira - the answer to this will decide how to proceed.
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.