On Tue, Jun 26, 2012 at 10:55 AM, Ludovic Dubost <[email protected]> wrote: > 2012/6/26 Thomas Mortagne <[email protected]>: >> On Mon, Jun 25, 2012 at 7:46 PM, Ludovic Dubost <[email protected]> wrote: >>> While working on a prototype on a HTML5 mobile and desktop application >>> I've hit a few limitations of the REST APIs. >>> This is why I propose some enhancements to the current REST APIs to >>> give more flexibility, particularly: >>> >>> Support for start and order parameter in queries returning large >>> list of pages >> >> For complete and easy pagination it would be nice to support/get at >> least the following for anything that return a list of anything: >> * start >> * offset >> * optional totalHits >> >> like Extension Repository REST API does. See >> https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-repositories/xwiki-commons-extension-repository-xwiki/xwiki-commons-extension-repository-xwiki-api/src/main/java/org/xwiki/extension/repository/xwiki/Resources.java#L103 >> >>> Support order parameter in page list >>> Adding page version, author information and data information when missing >> >> +1 >> >>> Hidden documents filter activation or deactivation in REST APIs >> >> +1 >> >>> Adding pretty display of title and author names >> >> Only if it's disabled by default and you can enable it with a >> parameter. This is potentially pretty expensive and not everyone needs >> it when dealing with pure datas through REST. >> >>> Support queries using XWQL, HQL and Lucene >> >> Big +1. >> >> This one is definitely a very important missing peace in REST API. >> >>> The rendered content should be accessible from REST apis >> >> Note that getting the rendered content of a document in any output >> syntax can be done easily with /get/ action right now. > > Yes that's true, but it does not feel right that you need to go to the > other XWiki URLs.
Sure, was just indicating that there is a workaround for it so it's less critical than other things like search. > Additionally the ability to get absolute URLs in the generated HTML is > useful in the context of a client application, since this avoids the > need to manipulate base URLs. > > Since this can be done with our URL generating system it's a good > thing to provide it. > > Ludovic > >> >>> >>> The details of the proposal is here: >>> >>> http://dev.xwiki.org/xwiki/bin/view/Design/RESTApiImprovements >>> >>> >>> A pull request for a prototype implementation of these requirements is >>> available here: >>> >>> https://github.com/xwiki/xwiki-platform/pull/56/files#r1040052 >>> >>> Not everything has an implementation (hidden docs and rendered content >>> is not implemented yet). Other are not implementing according to this >>> specification as some comments have already been made. >>> >>> Particularly the following votes are required: >>> >>> VOTE to accept supporting "start" and "order" parameters only on >>> queries having only one unique scope >>> VOTE in search queries for just adding the descendent date order or >>> add more order possibilities using order and orderdir param >>> VOTE in page list queries for just adding the descendent date order or >>> add more order possibilities using order and orderdir param >>> VOTE to add page version and author fields to page and other resources >>> VOTE for adding the additional fields with or without a parameter >>> "pagedetails=1" >>> VOTE for adding a parameter to show/hide hidden documents independent >>> of user setting >>> VOTE to add the displayTitle field with or without the pagedetails=1 >>> parameter or with it's own parameter displayTitle=1 >>> VOTE to add the author display names with or without the >>> displayPrettyNames parameter >>> VOTE for supporting the searchQuery API at the wiki level with multi >>> wiki support at the lucene level >>> VOTE for adding rendered content using the withrenderedcontent=1 param >>> VOTE for having absolute URLs in the rendered content using >>> withabsoluteurls=1 param >>> >> >> There is a lot of things here and it''s hard to vote for everything at >> once, would be better to at least separate them by domain (rendering, >> search, page listing, etc.). Otherwise some that are almost obvious >> are going to be blocked by more debatable ones. >> >>> >>> Thanks >>> Ludovic >>> >>> -- >>> Ludovic Dubost >>> Founder and CEO >>> Blog: http://blog.ludovic.org/ >>> XWiki: http://www.xwiki.com >>> Skype: ldubost GTalk: ldubost >>> _______________________________________________ >>> devs mailing list >>> [email protected] >>> http://lists.xwiki.org/mailman/listinfo/devs >> >> >> >> -- >> Thomas Mortagne >> _______________________________________________ >> devs mailing list >> [email protected] >> http://lists.xwiki.org/mailman/listinfo/devs > > > > -- > Ludovic Dubost > Founder and CEO > Blog: http://blog.ludovic.org/ > XWiki: http://www.xwiki.com > Skype: ldubost GTalk: ldubost > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

