It's all about the answers!

Ask a question

How to get list of users? using Java plain API


0
1
Robert Siara (82914) | asked Dec 18 '12, 12:05 p.m.
 Hi,

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

I will be grateful for any help you can provide.

Accepted answer


permanent link
Susan Hanson (1.6k2170193) | answered Dec 18 '12, 5:58 p.m.
            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

Your answer


Register or to post your answer.