<
From version < 37.9 >
edited by DanJones
on 2012/08/17
To version < 38.1 >
edited by Fabio Mancinelli
on 2012/10/22
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.DanJones
1 +XWiki.fmancinelli
Content
... ... @@ -250,15 +250,34 @@
250 250  ** **Status codes:**
251 251  *** 200: If the request was successful.
252 252  
253 -=== /wikis/{wikiName}/search?q~={keywords}~[~[&scope~={name,content,title,objects}...]&number~=n] ===
253 +=== /wikis/query?q~={query}&wikis~=wikiList~[&distinct~={true,false}]~[&order~={asc,desc}]~[&start~=n][&number~=n]~[&prettyNames~={true,false}]~[&className~=className]
254 254  
255 255  * **HTTP Method:** GET
256 256  ** **Media types:**
257 257  *** application/xml (SearchResults element)
258 +** **Description:** Search resources (pages and attachments) using a Lucene query (handled by the [[Lucene Plugin>>extensions:Extension.Lucene Plugin]]) on the wikis that are specified as a comma separated list in the //wikis// parameter. If //className// is specified, the result will also contain the data for the first object of the corresponding class.
259 +** **Status codes:**
260 +*** 200: If the request was successful.
261 +
262 +
263 +=== /wikis/{wikiName}/search?q~={keywords}~[~[&scope~={name,content,title,objects}...]&start~=n]~[&number~=n]~[&orderField~=field&order~={asc,desc}]~[distinct~={true,false}]~[&prettyNames~={true,false}] ===
264 +
265 +* **HTTP Method:** GET
266 +** **Media types:**
267 +*** application/xml (SearchResults element)
258 258  ** **Description:** The list of pages and objects that contain the {keywords} in the specified {scope}s. Multiple scopes can be specified. Search results are relative to the whole {wikiName}
259 259  ** **Status codes:**
260 260  *** 200: If the request was successful.
261 261  
272 +=== /wikis/{wikiName}/query?q~={query}&type~={hql,xwql,lucene}~[&distinct~={true,false}]~~[&order~={asc,desc}]~[&start~=n][&number~=n]~[&prettyNames~={true,false}]~[&className~=className]
273 +
274 +* **HTTP Method:** GET
275 +** **Media types:**
276 +*** application/xml (SearchResults element)
277 +** **Description:** Allow to execute HQL, XWQL or Lucene queries on the given {wikiName}. The //q// parameter contains the corresponding query. See [[HQL Query Examples in Velocity>>platform:DevGuide.velocityHqlExamples]], [[XWiki Query Language Specification>>dev:Design.XWiki Query Language Specification]] and [[Lucene Plugin>>extensions:Extension.Lucene Plugin]] examples of the queries that can be specified in this parameter. If //className// is specified, the result will also contain the data for the first object of the corresponding class.
278 +** **Status codes:**
279 +*** 200: If the request was successful.
280 +
262 262  == Space resources ==
263 263  
264 264  === /wikis/{wikiName}/spaces[?start~=offset&number~=n] ===
... ... @@ -947,5 +947,3 @@
947 947  the ##<attribute>## elements) are useful when clients need to understand the type of data contained in an object (e.g., when they want to display it). They are not necessary when creating an object because the system already has this information. That's why the XML to be sent is smaller. Actually the only information needed is the ##<className>## and a set of ##<property name="..."><value>## elements.
948 948  
949 949  * How do you know what kind of information you can send with the XML? You can discover it by using the class description URI. If you go to ##http:~//localhost:8080/xwiki/rest/wikis/xwiki/classes ## you will get a list of all the classes defined in the Wiki. By looking at this you will understand what are the properties defined by each class, their types and attributes. In that way you will know what you're allowed to put in the ##<property><value>## elements of the XML you send.
950 -
951 -
XWiki.XWikiComments[3]
Date
... ... @@ -1,1 +1,1 @@
1 -2012-08-17 15:05:15.102
1 +2012-08-17 15:05:15.0

Get Connected