<
From version < 9.4 >
edited by Silvia Macovei
on 2009/10/06
To version < 10.1 >
edited by Silvia Macovei
on 2009/10/06
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -61,7 +61,7 @@
61 61  
62 62  == Interacting with the XWiki RESTful API ==
63 63  
64 -The XWiki RESTful API is accessible through HTTP so, in principle, you can use every client that is capable of "speaking" HTTP in order to interact with it, even a web browser!
64 +The XWiki RESTful API is accessible through HTTP so, in principle, you can use every client that is capable of "speaking" HTTP in order to interact with it. Even a web browser!
65 65  If you want to write more complex programs you might download an HTTP library for your favorite language (e.g., [[http://hc.apache.org/]]).
66 66  
67 67  Java users might take advantage of the [[JAXB>>https://jaxb.dev.java.net]] framework and its [[XJC binding compiler>>https://jaxb.dev.java.net/jaxb20-ea3/docs/xjc.html]] in order to generate domain object models directly from the [[XML Schema Definition>>http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rest/src/main/resources/xwiki.rest.model.xsd]], and use them for serializing and de-serializing XML representations.
... ... @@ -176,13 +176,13 @@
176 176  
177 177  In the following sections you will see that sometimes resources are created by using PUT and sometimes by using POST. The general principle is that if the client is responsible for choosing the resource URI then PUT is used. If it's the server that bears this responsibility then POST is used.
178 178  
179 -To be more clear, when a client wants to create a page it knows **where** that page should go, so it is able to communicate to the server the target URI. In this situation PUT is used.
179 +To be more clear, when a client wants to create a page it knows **where** that page should go, so it is able to communicate the server the target URI. PUT is used.
180 180  
181 -A client, on the contrary, cannot know beforehand what will be the URI of a comment, when comment URIs contains the ID of the comment and this information is generated by the server. In this case the client will do a POST and the server, in response, will communicate the URI it generated for the newly created comment.
181 +A client, on the contrary, cannot know beforehand what will be the URI of a comment, since comment URIs contains the ID of the comment and this information is generated by the server. In this case the client will do a POST and the server, in response, will communicate the URI it generated for the newly created comment.
182 182  
183 183  == XWiki RESTful API Documentation ==
184 184  
185 -In this section you will find the documentation for the whole XWiki RESTful API.
185 +In this section you will find the documentation of the whole XWiki RESTful API.
186 186  
187 187  **application/xml** representations refers to the XML Schema Definition at the following location: [[http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rest/src/main/resources/xwiki.rest.model.xsd]]
188 188  
... ... @@ -208,10 +208,8 @@
208 208  ** **Status codes:**
209 209  *** 200: If the request was successful.
210 210  
211 -==== /wikis/{wikiName}/search?q ====
211 +==== /wikis/{wikiName}/search?q~={keywords}~[~[&scope~={name,content,title,objects}...~]&number~=n~] ====
212 212  
213 -{keywords}[[[&scope={name,content,title,objects}...]]&number=n] ====
214 -
215 215  * **HTTP Method:** GET
216 216  ** **Media types:**
217 217  *** application/xml (SearchResults element)
... ... @@ -221,7 +221,7 @@
221 221  
222 222  === Space resources ===
223 223  
224 -==== /wikis/{wikiName}/spaces[[?start=offset&number=n]] ====
222 +==== /wikis/{wikiName}/spaces[?start~=offset&number~=n] ====
225 225  
226 226  * **HTTP Method:** GET
227 227  ** **Media types:**
... ... @@ -230,10 +230,8 @@
230 230  ** **Status codes:**
231 231  *** 200: If the request was successful.
232 232  
233 -==== /wikis/{wikiName}/spaces/{spaceName}/search?q ====
231 +==== /wikis/{wikiName}/spaces/{spaceName}/search?q~={keywords}~[~[&scope~={name,content,title,objects}...~]&number~=n~] ====
234 234  
235 -{keywords}[[[&scope={name,content,title,objects}...]]&number=n] ====
236 -
237 237  * **HTTP Method:** GET
238 238  ** **Media types:**
239 239  *** application/xml (Search results element)
... ... @@ -244,7 +244,7 @@
244 244  
245 245  === Page resources ===
246 246  
247 -==== /wikis/{wikiName}/spaces/{spaceName}/pages[[?start=offset&number=n]] ====
243 +==== /wikis/{wikiName}/spaces/{spaceName}/pages[?start~=offset&number~=n] ====
248 248  
249 249  * **HTTP Method:** GET
250 250  ** **Media types:**
... ... @@ -290,7 +290,7 @@
290 290  *** 204: If the request was successful.
291 291  *** 401: If the user is not authorized.
292 292  
293 -==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history[[?start=offset&number=n]] ====
289 +==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history[?start~=offset&number~=n] ====
294 294  
295 295  * **HTTP Method:** GET
296 296  ** **Media types:**
... ... @@ -310,7 +310,7 @@
310 310  *** 200: If the request was successful.
311 311  *** 401: If the user is not authorized.
312 312  
313 -==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/translations[[?start=offset&number=n]] ====
309 +==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/translations[?start~=offset&number~=n] ====
314 314  
315 315  * **HTTP Method:** GET
316 316  ** **Media types:**
... ... @@ -422,7 +422,7 @@
422 422  *** 200: If the request was successful.
423 423  *** 401: If the user is not authorized.
424 424  
425 -==== /wikis/{wikiName}/tags/{tag1}[[,{tag2},{tag3}...]][[?start=offset&number=n]] ====
421 +==== /wikis/{wikiName}/tags/{tag1}[,{tag2},{tag3}...][?start~=offset&number~=n] ====
426 426  
427 427  * **HTTP Method:** GET
428 428  ** **Media types:**
... ... @@ -434,7 +434,7 @@
434 434  
435 435  === Comments resources ===
436 436  
437 -==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/comments[[?start=offset&number=n]] ====
433 +==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/comments[?start~=offset&number~=n] ====
438 438  
439 439  * **HTTP Method:** GET
440 440  ** **Media types:**
... ... @@ -490,7 +490,7 @@
490 490  
491 491  === Attachments resources ===
492 492  
493 -==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/attachments[[?start=offset&number=n]] ====
489 +==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/attachments[?start~=offset&number~=n] ====
494 494  
495 495  * **HTTP Method:** GET
496 496  ** **Media types:**
... ... @@ -532,7 +532,7 @@
532 532  *** 204: If the attachment was deleted.
533 533  *** 401: If the user is not authorized.
534 534  
535 -==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/attachments[[?start=offset&number=n]] ====
531 +==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/attachments[?start~=offset&number~=n] ====
536 536  
537 537  * **HTTP Method:** GET
538 538  ** **Media types:**
... ... @@ -574,7 +574,7 @@
574 574  
575 575  === Object resources ===
576 576  
577 -==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects[[?start=offset&number=n]] ====
573 +==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects[?start~=offset&number~=n] ====
578 578  
579 579  * **HTTP Method:** GET
580 580  ** **Media types:**
... ... @@ -597,7 +597,7 @@
597 597  *** 201: If the object was created (The Location header will contain the URI associated to the newly created object).
598 598  *** 401: If the user is not authorized.
599 599  
600 -==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects/{className}[[?start=offset&number=n]] ====
596 +==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects/{className}[?start~=offset&number~=n] ====
601 601  
602 602  * **HTTP Method:** GET
603 603  ** **Media types:**
... ... @@ -673,7 +673,7 @@
673 673  *** 202: If the object was updated.
674 674  *** 401: If the user is not authorized.
675 675  
676 -==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/objects[[?start=offset&number=n]] ====
672 +==== /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/objects[?start~=offset&number~=n] ====
677 677  
678 678  * **HTTP Method:** GET
679 679  ** **Media types:**
... ... @@ -725,7 +725,7 @@
725 725  
726 726  === Class resources ===
727 727  
728 -==== /wikis/{wikiName}/classes[[?start=offset&number=n]] ====
724 +==== /wikis/{wikiName}/classes[?start~=offset&number~=n] ====
729 729  
730 730  * **HTTP Method:** GET
731 731  ** **Media types:**
... ... @@ -767,7 +767,7 @@
767 767  
768 768  === Other resources ===
769 769  
770 -==== /wikis/{wikiName}/modifications[[?start=offset&number=n&timestamp=t]] ====
766 +==== /wikis/{wikiName}/modifications[?start~=offset&number~=n&timestamp~=t] ====
771 771  
772 772  * **HTTP Method:** GET
773 773  ** **Media types:**

Get Connected