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

how to fetch user names and their email address who belong to a team area?

Hello,
can i fetch all the user names and their email address who belong to a particular team area?
are their any OSLC/REST api's to meet this requirement?

Thanks
Shruti

0 votes


Accepted answer

Permanent link
Hi,
 Using java client api, method would look something like this.

public void fetchContributorsFromTeamArea(ITeamArea iTeamArea) throws TeamRepositoryException {

        IContributorHandle[] iContributorHandles = iTeamArea.getMembers();
        int i = 0;
        for (IContributorHandle iContributorHandle : iContributorHandles) {
            IContributor iContributor = (IContributor) repository.itemManager()
                    .fetchCompleteItem(iContributorHandle,
                            IItemManager.DEFAULT, monitor);
            System.out.println(iContributor.getName() + "\t"
                    + iContributor.getUserId() + "\t"
                    + iContributor.getEmailAddress());

        }

    }
shruti gudagur selected this answer as the correct answer

0 votes

Comments

Thank you Ajay.

   

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,950
× 235

Question asked: Jun 04 '14, 6:46 a.m.

Question was seen: 4,595 times

Last updated: Jun 10 '14, 2:41 a.m.

Confirmation Cancel Confirm