[xwiki-devs] REST API usage
Hi everybody, I was wondering in which XWiki subsystems the REST API is used in a direct way. I know that it is used in different place but I don't have a clear vision. Could you please tell me where are you using it? Thanks, Fabio
Side topic: I'll get some feedback tomorrow from an XWiki users and how they're using the REST API to expose XWiki data in a portal. Here's some of the feedback I got: - When retrieving the content of a page from REST, we get source content (wiki syntax) -> il would be nice to be able to get HTML-rendered content too - We'd need to provide some high-level services from REST -> for instance a REST resource that sends back the whole arborescence of the wiki (right now you have to retrieve every space, then every page of every space one by one) Guillaume On Thu, Mar 10, 2011 at 16:10, Fabio Mancinelli <fabio.mancinelli@xwiki.com>wrote:
Hi everybody,
I was wondering in which XWiki subsystems the REST API is used in a direct way. I know that it is used in different place but I don't have a clear vision.
Could you please tell me where are you using it?
Thanks, Fabio _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
On Thu, Mar 10, 2011 at 4:14 PM, Guillaume Lerouge <guillaume@xwiki.com> wrote:
Side topic: I'll get some feedback tomorrow from an XWiki users and how they're using the REST API to expose XWiki data in a portal.
Here's some of the feedback I got:
- When retrieving the content of a page from REST, we get source content (wiki syntax) -> il would be nice to be able to get HTML-rendered content too
Indeed. This is just a matter of extending the API to "accept" other content type. Currently only XML and JSON are supported. So for example if you do a $ curl http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome you will get an XML representation of Main.WebHome doing a $ curl -H "Accept: application/json" http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome will give you a JSON representation. In the future we might think of having $ curl -H "Accept: text/html" ... -> Page rendered in HTML $ curl -H "Accept: application/pdf" ... -> Page rendered in PDF etc. This is not that hard to implement, though I remember that there was a bug in RestLet concerning "accept" variants that I hope it has been fixed.
- We'd need to provide some high-level services from REST -> for instance a REST resource that sends back the whole arborescence of the wiki (right now you have to retrieve every space, then every page of every space one by one)
Well, navigating and discovering resources is one of the fundamental principle behind a REST API :) Anyway I understand the need. Again, this can be done quite easily and the result can be a document with links to all (or a subset of) the resources exposed through the REST API. This can be quite heavy from a computational point of view, above all if you are dealing with huge wikis (a lot of pages and spaces). Nothing that couldn't be solved by imposing some limits and a smart pagination mechanism. -Fabio
Guillaume
On Thu, Mar 10, 2011 at 16:10, Fabio Mancinelli <fabio.mancinelli@xwiki.com>wrote:
Hi everybody,
I was wondering in which XWiki subsystems the REST API is used in a direct way. I know that it is used in different place but I don't have a clear vision.
Could you please tell me where are you using it?
Thanks, Fabio _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
I've talked to a Sinequa consultant for integration of XWiki with the Sinequa indexer using the REST api. A few things where missing: XML export using REST (this is actually way important also for exports and stuff. We need all XML exports that we have in the XWiki api, with versions, without, with attachments, without etc..) All modified pages accross wikis in a XEM List of deleted pages or more generally an exposition of the activity stream HTML rendered version Some easier way to access the rights information of a page/space/wiki (the XML version of a page allows it but a more specific rights subsystem could be usefull) Same thing for user and groups This is probably true for any search engine. It was possible to use other XWiki URLs to access the missing information but having it in REST would be better. Ludovic Le 10/03/11 16:14, Guillaume Lerouge a écrit :
Side topic: I'll get some feedback tomorrow from an XWiki users and how they're using the REST API to expose XWiki data in a portal.
Here's some of the feedback I got:
- When retrieving the content of a page from REST, we get source content (wiki syntax) -> il would be nice to be able to get HTML-rendered content too - We'd need to provide some high-level services from REST -> for instance a REST resource that sends back the whole arborescence of the wiki (right now you have to retrieve every space, then every page of every space one by one)
Guillaume
On Thu, Mar 10, 2011 at 16:10, Fabio Mancinelli <fabio.mancinelli@xwiki.com>wrote:
Hi everybody,
I was wondering in which XWiki subsystems the REST API is used in a direct way. I know that it is used in different place but I don't have a clear vision.
Could you please tell me where are you using it?
Thanks, Fabio _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
On Thu, 2011-03-10 at 16:10 +0100, Fabio Mancinelli wrote:
Hi everybody,
I was wondering in which XWiki subsystems the REST API is used in a direct way.
Hi Fabio, Annotations use it, by defining some annotations resources, to expose the annotations data to the client. See here: http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-annotations/xwi... . It's not yet there, but I will probably use it for the dashboard as well, since I will need to get some data on client and the simplest way is to have a REST resource. Happy coding, Anca
I know that it is used in different place but I don't have a clear vision.
Could you please tell me where are you using it?
Thanks, Fabio _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
On 03/10/2011 04:10 PM, Fabio Mancinelli wrote:
Hi everybody,
I was wondering in which XWiki subsystems the REST API is used in a direct way. I know that it is used in different place but I don't have a clear vision.
Could you please tell me where are you using it?
It's used in the various suggests (jump to page, inputs with "suggestDocuments" or "suggestUsers" css class). -- Sergiu Dumitriu http://purl.org/net/sergiu/
It is also used by the XWiki Explorer tree (tree view of Main.AllDocs and WYSIWYG content editor link wizard) to populate itself (get all spaces, get all pages from a space, etc.). Hope this helps, Marius On 03/10/2011 05:10 PM, Fabio Mancinelli wrote:
Hi everybody,
I was wondering in which XWiki subsystems the REST API is used in a direct way. I know that it is used in different place but I don't have a clear vision.
Could you please tell me where are you using it?
Thanks, Fabio _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
participants (6)
-
Fabio Mancinelli -
Guillaume Lerouge -
Luca Anca -
Ludovic Dubost -
Marius Dumitru Florea -
Sergiu Dumitriu