Getting the UUID of the current user
I'm looking for a way to get the UUID of the user currently signed in.
I know about the 'users' REST services (eg /ccm/whoami and /jts/users/{username}) but neither of those includes the internal UUID in the result. I read through the JFSUsersAPI wiki page (https://jazz.net/wiki/bin/view/Main/JFSUsersAPI) but that doesn't seem to have any info either. Any ideas? |
One answer
Are you trying to do this via the Java client API or via the web interfaces?
For the Java client API you can use: com.ibm.team.repository.client.ITeamRepository.getUserId(), com.ibm.team.repository.client.ITeamRepository.contributorManager() and com.ibm.team.repository.client.IContributorManager.fetchContributorByUserId(String, IProgressMonitor) The Jazz web UI uses, e.g.: https://jazz.net/jazz/service/com.ibm.team.repository.service.internal.webuiInitializer.IWebUIInitializerRestService/initializationData which contains a currentContributorInitializer section, e.g.:
Note that this is internal though. As for pure JFS API, I'm not sure. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.