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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.