I am using Java REST API to develop a WEB front for my company.
The first thing is login:
JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, username, password);
Then to get the user information. There are TWO methods in
UserRestClient userClient = jiraRestClient.getUserClient(); UserRestClient.getUser(String username); UserRestClient.getUser(URI userUri);
The API doc says prefer the 2nd method over the first.
But that’s the
userUri? How can I get it? All I have is username and password provided by the user.
I tried the first method [
UserRestClient.getUser(String username)], but it does NOT work all the time. Sometime is OK, sometime it DOESN’T.
Please help! Thanks a lot!!!