Thanks Francesco. Unless I'm mistaken though, you're calling "getTotalCount" on the total list of users that is returned (PagedResult<UserTO> )? What if you wanted to just find out the total count of users, without having to actually download all the user attributes etc. (so if you have a very large number of users).
Colm. On Fri, Jul 15, 2016 at 3:12 PM, Francesco Chicchiriccò <[email protected] > wrote: > On 14/07/2016 18:51, Francesco Chicchiriccò wrote: > >> Il 14 luglio 2016 18:48:30 CEST, Colm O hEigeartaigh <[email protected]> >> ha scritto: >> >>> Hi, >>> >>> Is it possible to obtain a count of the total users in Syncope 2.0.0? >>> Previously you could do GET /users/count, but it doesn't seem to be >>> working >>> in Syncope 2.0.0 unless I'm mistaken. >>> >> Hi, >> look at UserITCase and SearchITCase (can't access the source code right >> now). >> > > It's something like as > > syncopeClient.getService(UserService.class). > search(new > AnyQuery.Builder().realm(realm).page(1).size(1).build()). > getTotalCount() > > HTH > > Regards. > > -- > Francesco Chicchiriccò > > Tirasa - Open Source Excellence > http://www.tirasa.net/ > > Involved at The Apache Software Foundation: > member, Syncope PMC chair, Cocoon PMC, Olingo PMC, > CXF Committer, OpenJPA Committer, PonyMail PPMC > http://home.apache.org/~ilgrosso/ > > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
