Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?

0 votes



One answer

Permanent link
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.:

"com.ibm.team.repository.service.currentContributorInitializer": {
"currentContributor": {
"_eQualifiedClassName": "com.ibm.team.repository:Contributor",
"archived": false,
"com.ibm.team.repository.typeName": "com.ibm.team.repository.Contributor",
"contextId": "_8lNyYNwSEd2pIJ5QVwgQGg",
"details": {
"_eQualifiedClassName": "com.ibm.team.repository:ContributorDetailsHandle",
"com.ibm.team.repository.typeName": "com.ibm.team.repository.ContributorDetails",
"itemId": "_7yhV8qjWEd-D1aqWcEbu6Q"
},
"emailAddress": "Nick_Edgar@ca.ibm.com",
"immutable": true,
"itemId": "_wzp-IPYJEdqU64Cr2VV0dQ",
"mergePredecessor": null,
"modified": "2010-09-14T15:56:54.072Z",
"modifiedBy": {
"_eQualifiedClassName": "com.ibm.team.repository:ContributorHandle",
"com.ibm.team.repository.typeName": "com.ibm.team.repository.Contributor",
"itemId": "_wzp-IPYJEdqU64Cr2VV0dQ"
},
"name": "Nick Edgar",
"predecessor": "_sUp4QcAYEd-fRr9iR3W1xg",
"stateId": "_seTjgcAYEd-fRr9iR3W1xg",
"userId": "nedgar"
},


Note that this is internal though.

As for pure JFS API, I'm not sure.

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Oct 15 '10, 4:50 p.m.

Question was seen: 5,740 times

Last updated: Oct 15 '10, 4:50 p.m.

Confirmation Cancel Confirm