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

How to get list of users? using Java plain API

 Hi,

How can I get a list of users using the Java API?

I will be grateful for any help you can provide.

1

0 votes


Accepted answer

Permanent link
            IContributorManager icm = teamRepository.contributorManager();
            List<IContributor> allContribs = icm.fetchAllContributors(monitor);
            System.out.println("I have " + allContribs.size() + " total users in the repository");


Returns all, including archived.  You can iterate on the allContribs list and check each IContributor to see if they are archived:
contributor.isArchived()  (where contributor came from the loop for (IContributor contributor : allContribs)).
Robert Siara selected this answer as the correct answer

1 vote

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

Question asked: Dec 18 '12, 12:05 p.m.

Question was seen: 6,637 times

Last updated: Dec 18 '12, 5:58 p.m.

Confirmation Cancel Confirm