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

How to acess email id and user name of users in RTC using server side api or script

Hello Everyone,


I am using RTC 606.1
I have to access user name and email id of users using server side api or with scripts.
Is it possible to access and update email id and user name of user in customer attributes.
Kindly provide me the api to access username and email id of users.

Thanks in advanced
Pallavi Deore

0 votes



2 answers

Permanent link
There is no supported JavaScript API for that.
In the Java APIs you get the com.ibm.team.repository.common.IContributor interface and can access that information. Usually you use the com.ibm.team.repository.client.IContributorManager to locate the user, or you get a IContributorHandle and resolve that. The IContributorManager can be accessed from the ITeamRepository object in the client API.


0 votes

Comments

Hi Ralph,


Is there any server side api for this requirements. 


Permanent link
There are several ways to do this, but are you looking for the details of all users or just the current logged in user?

For the current logged in user you can use the following:

dojo.require("com.ibm.team.repository.web.client.session.Session"); 
...
  var loggedInUser = com.ibm.team.repository.web.client.session.getAuthenticatedContributor();
...

This will return an object containing details of the currently logged in user. There are also several other methods on the com.ibm.team.repository.web.client.session object that return subsets of this information.

For all users, you need to use the OSLC API for the application and project area you're working with - you have to be very careful with filtering so that you don't cause performance problems.

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,936

Question asked: Aug 04 '20, 5:14 a.m.

Question was seen: 2,096 times

Last updated: Aug 05 '20, 6:40 p.m.

Confirmation Cancel Confirm