[vote] improvements for the REST api

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[vote] improvements for the REST api

Ludovic Dubost
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
    Support order parameter in page list
    Adding page version, author information and data information when missing
    Hidden documents filter activation or deactivation in REST APIs
    Adding pretty display of title and author names
    Support queries using XWQL, HQL and Lucene
    The rendered content should be accessible from REST apis

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


Thanks
Ludovic

--
Ludovic Dubost
Founder and CEO
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [vote] improvements for the REST api

sasinda
Hi Ludovic,
It's an interesting proposal.
My +1 for , *"*VOTE for supporting the searchQuery API at the wiki level
with multi
wiki support at the lucene level".
https://github.com/xwiki-contrib/android-client/blob/p2/xwiki-android-core/src/org/xwiki/android/ral/RAO.java


I had already added a method for queries in the ReSTful Access Object
Interface(DAO pattern) in the XWiki Android Client project.(still under
development)
I needed to query for all documents in the blog space with a BlogPostClass
object inside it.I used the following querry
"/xwiki/rest/wikis/xwiki/spaces/Blog/search?q=BlogPostClass&scope=* " and
was unsuccessful.
So with the current status of the ReSTful API I think the querry method in
the RAO will have to bring in all pages and look through the object
summeries at the client side. This would be really be an inefficient usage
of network resources for the mobile device. Also the mobile device would be
now computing things that should be ideally be computed inside the server.

Thanks
Best Regards,
Sasinda.



On Mon, Jun 25, 2012 at 11:16 PM, Ludovic Dubost <[hidden email]> 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
>    Support order parameter in page list
>    Adding page version, author information and data information when
> missing
>    Hidden documents filter activation or deactivation in REST APIs
>    Adding pretty display of title and author names
>    Support queries using XWQL, HQL and Lucene
>    The rendered content should be accessible from REST apis
>
> 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
>
>
> Thanks
> Ludovic
>
> --
> Ludovic Dubost
> Founder and CEO
> Blog: http://blog.ludovic.org/
> XWiki: http://www.xwiki.com
> Skype: ldubost GTalk: ldubost
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [vote] improvements for the REST api

Thomas Mortagne
Administrator
In reply to this post by Ludovic Dubost
On Mon, Jun 25, 2012 at 7:46 PM, Ludovic Dubost <[hidden email]> 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.

>
> 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
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs



--
Thomas Mortagne
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [vote] improvements for the REST api

Ludovic Dubost
2012/6/26 Thomas Mortagne <[hidden email]>:

> On Mon, Jun 25, 2012 at 7:46 PM, Ludovic Dubost <[hidden email]> 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.
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
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/devs
>
>
>
> --
> Thomas Mortagne
> _______________________________________________
> devs mailing list
> [hidden email]
> 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
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [vote] improvements for the REST api

Thomas Mortagne
Administrator
On Tue, Jun 26, 2012 at 10:55 AM, Ludovic Dubost <[hidden email]> wrote:

> 2012/6/26 Thomas Mortagne <[hidden email]>:
>> On Mon, Jun 25, 2012 at 7:46 PM, Ludovic Dubost <[hidden email]> 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
>>> [hidden email]
>>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>>
>>
>> --
>> Thomas Mortagne
>> _______________________________________________
>> devs mailing list
>> [hidden email]
>> 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
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs



--
Thomas Mortagne
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [vote] improvements for the REST api

Ludovic Dubost
In reply to this post by Ludovic Dubost
Hi,

New vote for the current pull request which takes into account Thomas comments

https://github.com/xwiki/xwiki-platform/pull/56

The following things are implemented:

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

Only the descendent date has been added for now

VOTE to add page version and author fields to page and other resources

This has been implemented

VOTE for adding the display user names when the parameter
"prettynames=true" is added

VOTE to add the displayTitle field with or without the pagedetails=1
parameter or with it's own parameter displayTitle=1

This has been done without parameter as it does not seem necessary to
have a parameter

VOTE for supporting the searchQuery API at the wiki level with multi
wiki support at the lucene level

This has been done


Note done at this point:

VOTE for adding a parameter to show/hide hidden documents independent
of user setting

VOTE for adding rendered content using the withrenderedcontent=1 param

VOTE for having absolute URLs in the rendered content using
withabsoluteurls=1 param

Most important

VOTE Can I commit the current branch ?

Ludovic

2012/6/25 Ludovic Dubost <[hidden email]>:

> 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
>     Support order parameter in page list
>     Adding page version, author information and data information when missing
>     Hidden documents filter activation or deactivation in REST APIs
>     Adding pretty display of title and author names
>     Support queries using XWQL, HQL and Lucene
>     The rendered content should be accessible from REST apis
>
> 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
>
>
> Thanks
> Ludovic
>
> --
> Ludovic Dubost
> Founder and CEO
> Blog: http://blog.ludovic.org/
> XWiki: http://www.xwiki.com
> Skype: ldubost GTalk: ldubost



--
Ludovic Dubost
Founder and CEO
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [vote] improvements for the REST api

sasinda
Hi Ludovic,
As you are doing some improvements,
I think the editing and deleting of comments as first class entities does
not work.
PUT : http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Blog/pages/test/*
comments/0*
DELETE*: *
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Blog/pages/test/*
comments/0*
*
*
You can do it by updating/deleting the XWiki.XWikiComments objects though.

Regards,
Sasinda.

On Sun, Jul 22, 2012 at 12:22 PM, Ludovic Dubost <[hidden email]> wrote:

> Hi,
>
> New vote for the current pull request which takes into account Thomas
> comments
>
> https://github.com/xwiki/xwiki-platform/pull/56
>
> The following things are implemented:
>
> 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
>
> Only the descendent date has been added for now
>
> VOTE to add page version and author fields to page and other resources
>
> This has been implemented
>
> VOTE for adding the display user names when the parameter
> "prettynames=true" is added
>
> VOTE to add the displayTitle field with or without the pagedetails=1
> parameter or with it's own parameter displayTitle=1
>
> This has been done without parameter as it does not seem necessary to
> have a parameter
>
> VOTE for supporting the searchQuery API at the wiki level with multi
> wiki support at the lucene level
>
> This has been done
>
>
> Note done at this point:
>
> VOTE for adding a parameter to show/hide hidden documents independent
> of user setting
>
> VOTE for adding rendered content using the withrenderedcontent=1 param
>
> VOTE for having absolute URLs in the rendered content using
> withabsoluteurls=1 param
>
> Most important
>
> VOTE Can I commit the current branch ?
>
> Ludovic
>
> 2012/6/25 Ludovic Dubost <[hidden email]>:
> > 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
> >     Support order parameter in page list
> >     Adding page version, author information and data information when
> missing
> >     Hidden documents filter activation or deactivation in REST APIs
> >     Adding pretty display of title and author names
> >     Support queries using XWQL, HQL and Lucene
> >     The rendered content should be accessible from REST apis
> >
> > 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
> >
> >
> > Thanks
> > Ludovic
> >
> > --
> > Ludovic Dubost
> > Founder and CEO
> > Blog: http://blog.ludovic.org/
> > XWiki: http://www.xwiki.com
> > Skype: ldubost GTalk: ldubost
>
>
>
> --
> Ludovic Dubost
> Founder and CEO
> Blog: http://blog.ludovic.org/
> XWiki: http://www.xwiki.com
> Skype: ldubost GTalk: ldubost
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: [vote] improvements for the REST api

sasinda
Hi,
What about adding meta data like
<comments xmlns="http://www.xwiki.org" size='10' ids='0:5,7:10'  >
(size means num comments. ids='0:5 , 7:10' means that comment with id 6 was
deleted.)
for elements containing a collection. i.e comments, objects , etc.
Thomas and I discussed about lazy fetching of Documents using a RestClient.
Those meta data can greatly help in such a situation.

Also I noted in XWiki version 3.5.1 that retrieving objects in page history
versions does not work. They give the same thing for every version. Am I
right?.

Best Regards.
Sasinda.








On Sun, Aug 12, 2012 at 4:03 PM, sasinda rukshan
<[hidden email]>wrote:

> Hi Ludovic,
> As you are doing some improvements,
> I think the editing and deleting of comments as first class entities does
> not work.
> PUT : http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Blog/pages/test/
> *comments/0*
> DELETE*: *
> http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Blog/pages/test/*
> comments/0*
> *
> *
> You can do it by updating/deleting the XWiki.XWikiComments objects though.
>
> Regards,
> Sasinda.
>
> On Sun, Jul 22, 2012 at 12:22 PM, Ludovic Dubost <[hidden email]>wrote:
>
>> Hi,
>>
>> New vote for the current pull request which takes into account Thomas
>> comments
>>
>> https://github.com/xwiki/xwiki-platform/pull/56
>>
>> The following things are implemented:
>>
>> 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
>>
>> Only the descendent date has been added for now
>>
>> VOTE to add page version and author fields to page and other resources
>>
>> This has been implemented
>>
>> VOTE for adding the display user names when the parameter
>> "prettynames=true" is added
>>
>> VOTE to add the displayTitle field with or without the pagedetails=1
>> parameter or with it's own parameter displayTitle=1
>>
>> This has been done without parameter as it does not seem necessary to
>> have a parameter
>>
>> VOTE for supporting the searchQuery API at the wiki level with multi
>> wiki support at the lucene level
>>
>> This has been done
>>
>>
>> Note done at this point:
>>
>> VOTE for adding a parameter to show/hide hidden documents independent
>> of user setting
>>
>> VOTE for adding rendered content using the withrenderedcontent=1 param
>>
>> VOTE for having absolute URLs in the rendered content using
>> withabsoluteurls=1 param
>>
>> Most important
>>
>> VOTE Can I commit the current branch ?
>>
>> Ludovic
>>
>> 2012/6/25 Ludovic Dubost <[hidden email]>:
>> > 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
>> >     Support order parameter in page list
>> >     Adding page version, author information and data information when
>> missing
>> >     Hidden documents filter activation or deactivation in REST APIs
>> >     Adding pretty display of title and author names
>> >     Support queries using XWQL, HQL and Lucene
>> >     The rendered content should be accessible from REST apis
>> >
>> > 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
>> >
>> >
>> > Thanks
>> > Ludovic
>> >
>> > --
>> > Ludovic Dubost
>> > Founder and CEO
>> > Blog: http://blog.ludovic.org/
>> > XWiki: http://www.xwiki.com
>> > Skype: ldubost GTalk: ldubost
>>
>>
>>
>> --
>> Ludovic Dubost
>> Founder and CEO
>> Blog: http://blog.ludovic.org/
>> XWiki: http://www.xwiki.com
>> Skype: ldubost GTalk: ldubost
>> _______________________________________________
>> devs mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs