This default 10 limit looks like a bug to me. Even if this was done on
purpose it really does not make any sense from API point of view IMO
and should be removed.

Would be great if you could report it on http://jira.xwiki.org.

On Fri, May 20, 2016 at 1:51 PM, Mark Sack <mark.s...@secti.al.gov.br> wrote:
> I'm using the REST API to get the wiki users as per the example in
> http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI
> i.e.
>
> http://<server>/xwiki/rest/wikis/query?q=object:XWiki.XWikiUsers
>
> This only returns 10 of the users in the wiki database. If I make the call
> using curl, it returns 10 non-hidden users. If I make the call from a
> browser, it returns almost the same set of 10 users except that 2 of them
> are replaced with hidden users.
>
> I can get around this by adding the start and number parameters to the query
> and then repeating the call incrementing the start parameter until nothing
> is returned.
>
> This leads to a number of questions.
> 1. Is there a way to adjust the default limit of 10 results other than using
> the number parameter?
> 2. Is there a way to get the count of the total number of users using the
> REST API?
> 3. Is there an explanation for the different behaviour between curl and the
> browser? Which behaviour should I expect if making the call from another
> application (eg. Rails)?
> 4. Is there a more elegant way to get all of the users through the API?
> 5. Is this documented somewhere that I've missed or would it be useful to
> add a comment to the RESTful API page?
> 6. Niggly point regarding the REST API page. In some places, the start
> parameter is labeled as 'n' and in others as 'offset'. I assume this is
> perhaps an artefact of updates by different authors. Should it really be
> 'offset' everywhere or is the distinction intentional?
>
> Regards
> Mark
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/REST-query-returns-subset-of-results-tp7599544.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



-- 
Thomas Mortagne
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to