XWiki provides fine-grain access to virtually every element through an API that is based on HTTP semantics, i.e., a RESTful API. In this page you will find all the details to take advantage of this API and the instructions to use it at its full potential.

By defaut the XWiki RESTful API entrypoint is rooted at the following URI : http://server:port/xwiki/rest/ (depending on where your XWiki is running)

Dataset

This section contains a brief and high-level description of the XWiki data set that should serve as a basis for presenting resources and their associated operations.

XWiki has pages organized in spaces. Each page is available in multiple versions (its history) and translations. Translated pages have their own versions and history which are independent. Each page might have attachments. Each attachment has its own history. Attachments are shared among all the different translations of a page (i.e., the same set of attachments is the same regardless of the page language). Pages can have one or more objects. Objects are instances of a class that contains a set of properties. Some objects might be directly exposed as first class entities, such as comments and tags. Objects, as attachments, are shared among all page translations.

Understanding resources and representations

"An important concept in REST is the existence of resources (sources of specific information), each of which is referenced with a global identifier (e.g., an URI in HTTP). In order to manipulate these resources, components of the network (user agents and origin servers) communicate via a standardized interface (e.g., HTTP) and exchange representations of these resources (the actual documents conveying the information)." (Wikipedia)

Resources in XWiki are pages, attachments, objects, properties, spaces, and all the things we described in the previous section. XWiki has a default way of conveying the information about these resources, i.e., by providing well defined XML representations that contain all the information associated to the resource in an XML format. This format is described using an XML Schema Definition file that can be found here: http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rest/src/main/resources/xwiki.rest.model.xsd

Of course the same resource can be represented in many different ways. This is yet to be documented.

Another important aspect of representations is that they contain useful information for linking related resources. This is a realization of the Hypermedia As The Engine Of The Application State (HATEOAS) principle. In XML representations this information is conveyed through the <link> tag. This tag has two important parameters: rel and href. rel specifies the "semantics" of the link, while href is the URI of the linked resource.

For example, in the representation of a page, we can have links to the comments, tags, attachments which are independent resources associated to the current page. These links are provided in the XML representation of a page and allow a client to navigate to related resources... Like we do every day when we click on a link in a web page.

representation

Relations

The available relations that you might find in the XML resource representations are the following:

RelSemantics
http://www.xwiki.org/rel/wikisThe representation containing the list of virtual wikis.
http://www.xwiki.org/rel/spacesThe representation containing the list of spaces in a wiki.
http://www.xwiki.org/rel/pagesThe representation containing the list of pages in a space.
http://www.xwiki.org/rel/translationThe representation containing a translation of a page.
http://www.xwiki.org/rel/pageThe representation for a page.
http://www.xwiki.org/rel/spaceThe representation for a space.
http://www.xwiki.org/rel/parentThe representation for the page that is parent of the current resource.
http://www.xwiki.org/rel/homeThe representation for the page that is the home of the current resource.
http://www.xwiki.org/rel/attachmentDataThe representation of the actual attachment data.
http://www.xwiki.org/rel/commentsThe representation of the list of comments associated to the current resource.
http://www.xwiki.org/rel/attachmentsThe representation of the list of attachments associated to the current resource.
http://www.xwiki.org/rel/objectsThe representation of the list of objects associated to the current resource.
http://www.xwiki.org/rel/objectThe representation for an object.
http://www.xwiki.org/rel/classesThe representation of the list of classes associated to the current resource.
http://www.xwiki.org/rel/historyThe representation of the list of history information associated to the current resource.
http://www.xwiki.org/rel/classThe representation for a class.
http://www.xwiki.org/rel/propertyThe representation for a property.
http://www.xwiki.org/rel/propertiesThe representation of the list of properties associated to the current resource.
http://www.xwiki.org/rel/modificationsThe representation of the list of modifications associated to the current resource.
http://www.xwiki.org/rel/childrenThe representation of the list of children associated to the current resource.
http://www.xwiki.org/rel/tagsThe representation of the list of tags associated to the current resource.
http://www.xwiki.org/rel/tagThe representation of a tag.
http://www.xwiki.org/rel/searchThe representation for a search resource.

Relations are defined as URIs in order to provide a sort of namespace. Currently these URIs are not links to real web pages but, in the future, they might point to descriptions of their semantics on actual web pages (or other kinds of representations).

The "HATEOAS" Graph

In order to better understand the relations among resources you might have a look at this graph that pictures all the resources available in the XWiki RESTful API and the relations among them. In this graph, nodes are URI templates representing classes of resources. Edges are the possible links that you might find in a representation of a given resource, and their associated relations.

This graph shows that by starting from the API entry-point a client can navigate and discover all the resources just by following the links provided in representations (and by knowing their semantics). This was exactly the way how this graph was generated.

Interacting with the XWiki RESTful API

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!
If you want to write more complex programs you might download an HTTP library for your favorite language (e.g., http://hc.apache.org/).

Java users might take advantage of the JAXB framework and its XJC binding compiler in order to generate domain object models directly from the XML Schema Definition, and use them for serializing and de-serializing  XML representations. 

If you use this approach (Apache HTTP Client + JAXB) you will find yourself writing some code like this:

HttpClient httpClient = new HttpClient();
JAXBContext context = JAXBContext.newInstance("model.package");
unmarshaller = context.createUnmarshaller();

GetMethod getMethod = new GetMethod("http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome");
getMethod.addRequestHeader("Accept", "application/xml");
httpClient.executeMethod(getMethod);

Page page = (Page) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

And you will have all the information about the Main.WebHome page in the Page object, without the need of handling XML directly.

Because of the wide variety of HTTP frameworks available we don't provide a full tutorial about using them. However, in order to show you how to interact with the XWiki RESTful API, we will use curl: a standard command line HTTP client that provides an interface to all the functionalities of the HTTP protocol.

By using curl, the previous example would have been:

$ curl http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<page xmlns="http://www.xwiki.org">
<link rel="http://www.xwiki.org/rel/space" href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main"/>
        ...

Authentication

The XWiki RESTful API supports two types of authentication:

  • HTTP BASIC Auth: You provide your credentials using the Authorization HTTP header
  • XWiki session: If you are logged in XWiki and you use the cookies provided by the authentication mechanism, you will also be authenticated to the XWiki RESTful API. This is useful, for example, when you are interacting with the API using the XMLHttpRequest object of a browser using Javascript.

If you don't provide any credentials the XWiki RESTful API will recognize you as a XWiki.Guest user.

So if you have, let's say a Main.PrivatePage, and you try to do: 

$ curl -v http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/PrivatePage
...
< HTTP/1.1 401 Unauthorized
...

You will get an Unauthorized empty response.

On the contrary, by specifying Admin credentials you gain access to the actual page:

$ curl -u Admin:admin http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/PrivatePage
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<page xmlns="http://www.xwiki.org">
<link rel="http://www.xwiki.org/rel/space" href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main"/>
...
<content>Only admin can see this</content>
</page>

Sending representations

Many resources are modifiable, so you can send representations in order to change the state of those resources (e.g., pages).
All modifiable resources accept XML representations that conform to the XML Schema Definition. However, some other representations might be accepted as well (see the following sections).

Resource update is usually done by using the PUT method, while resource creation is done via PUT or POST.

For example, in order to create a page you might do the following:

$ curl -u Admin:admin -X PUT -d "@newpage.xml" -H "Content-Type: application/xml" http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/NewPage
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<page xmlns="http://www.xwiki.org">
<link rel="http://www.xwiki.org/rel/space" href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main"/>
        ...
        <version>1.1</version>
<majorVersion>1</majorVersion>
<minorVersion>1</minorVersion>
<created>2009-03-21+01:00</created>
<creator>XWiki.Admin</creator>
<modified>2009-03-21+01:00</modified>
<modifier>XWiki.Admin</modifier>
<content>This is a new page</content>
</page>

Where newpage.xml is an XML file containing

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<page xmlns="http://www.xwiki.org">     
        <title>Hello world</title>
        <content>This is a new page</content>
</page>

The page has been created and is accessible. Subsequent PUT requests to the page URI will modify its content.

Overcoming browser limitations

As said before, it could be useful to send information by using browser's XmlHttpRequest objects. However, currently many browsers only support GET and POST methods, so it is impossible to send, for example, PUT requests. In order to overcome this limitation you can override the HTTP Method by specifying a method parameter in the URI query string. 

In the previous example, if you send a POST request to the http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/NewPage?method=PUT it will be interpreted as if it were an actual PUT request.

This overriding mechanism allows the interaction with the XWiki RESTful API by using any kind of browser.

PUT vs POST

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.

To be clearer, 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.

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.

XWiki RESTful API Documentation

In this section you will find the documentation of the whole XWiki RESTful API.

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 

Resource URIs are specified using URI templates. Bracketed elements are formal parameters and should be instantiated to actual values in order to retrieve the associated resource.

Root resources

By defaut all the resources of the RESTful API are rooted at the following URI : http://server:port/xwiki/rest/ (depending on where your XWiki is running)

/

  • HTTP Method: GET
    • Media types:
      • application/xml (XWiki element)
    • Description: Retrieves the entry root description containing information about the server.
    • Status codes:
      • 200: If the request was successful.

/wikis

  • HTTP Method: GET
    • Media types:
      • application/xml (Wikis element)
    • Description: Retrieves the entry root description containing information about the server.
    • Status codes:
      • 200: If the request was successful.

/wikis/{wikiName}/search?q={keywords}[[&scope={name,content,title,objects}...]&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (SearchResults element)
    • 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}
    • Status codes:
      • 200: If the request was successful.

Space resources

/wikis/{wikiName}/spaces[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Spaces element)
    • Description: Retrieves the list of spaces available in the {wikiName} wiki.
    • Status codes:
      • 200: If the request was successful.

/wikis/{wikiName}/spaces/{spaceName}/search?q={keywords}[[&scope={name,content,title,objects}...]&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Search results element)
    • 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 space {spaceName}
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

Page resources

/wikis/{wikiName}/spaces/{spaceName}/pages[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Pages element)
    • Description: The list of pages in the space {spaceName}
    • Status codes:
      • 200: If the request was successful
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}

  • HTTP Method: GET
    • Media types:
      • application/xml (Page element)
    • Description: 
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.


  • HTTP Method: PUT
    • Accepted Media types:
      • application/xml (Page element)
      • text/plain (Only page content)
      • application/x-www-form-urlencoded (allowed field names: title, parent, content)
    • Media types:
      • application/xml (Page element)
    • Description: Create or updates a page.
    • Status codes:
      • 201: If the page was created.
      • 202: If the page was updated.
      • 304: If the page was not modified.
      • 401: If the user is not authorized.


  • HTTP Method: DELETE
    • Media types:
      • application/xml (Page element)
    • Description: Delete the page.
    • Status codes:
      • 204: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (History element)
    • Description: The list of all the versions of the given page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}

  • HTTP Method: GET
    • Media types:
      • application/xml (Page element)
    • Description: The page at version {version}
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/translations[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Translations element)
    • Description: The list of available translation for the page
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/translations/{language}

  • HTTP Method: GET
    • Media types:
      • application/xml (Page element)
    • Description: The page at in the given {language}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.


  • HTTP Method: PUT
    • Accepted Media types:
      • application/xml (Page element)
      • text/plain (Only page content)
      • application/x-www-form-urlencoded (allowed field names: title, parent, content)
    • Media types:
      • application/xml (Page element)
    • Description: Create or updates a page translation.
    • Status codes:
      • 201: If the page was created.
      • 202: If the page was updated.
      • 304: If the page was not modified.
      • 401: If the user is not authorized.


  • HTTP Method: DELETE
    • Media types:
      • application/xml (Page element)
    • Description: Delete the page translation.
    • Status codes:
      • 204: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/translations/{language}/history

  • HTTP Method: GET
    • Media types:
      • application/xml (History element)
    • Description: The list of all the available revisions of the page in a given {language}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/translations/{lang}/history/{version}

  • HTTP Method: GET
    • Media types:
      • application/xml (Page element)
    • Description: A page at a given {version} in a given {language}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/children

  • HTTP Method: GET
    • Media types:
      • application/xml (Pages element)
    • Description: The list of the children of a given page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

Tag resources

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/tags

  • HTTP Method: GET
    • Media types:
      • application/xml (Tags element)
    • Description: List page tags.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.


  • HTTP Method: PUT
    • Accepted Media types:
      • application/xml (Tag element)
      • text/plain 
      • application/x-www-form-urlencoded (allowed field names: tag)
    • Media types:
      • application/xml (Tags element)
    • Description: Add a tag to the page.
    • Status codes:
      • 202: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/tags

  • HTTP Method: GET
    • Media types:
      • application/xml (Tags element)
    • Description: The list of all available tags
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/tags/{tag1}[,{tag2},{tag3}...][?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Pages element)
    • Description: The list of pages having the specified tags.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

Comments resources

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/comments[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Comments element)
    • Description: The list of comments on a given page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.


  • HTTP Method: POST
    • Accepted Media types:
      • application/xml (Comment element)
      • text/plain
      • application/x-www-form-urlencoded (allowed field names: text)
    • Media types:
      • application/xml (Comment element)
    • Description: Create a comment on the given page.
    • Status codes:
      • 201: If the comment was created. (The Location header will contain the URI where the comment has been created.)
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/comments/{commentId}

  • HTTP Method: GET
    • Media types:
      • application/xml (Comment element)
    • Description: A specific comment on a page
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/comments

  • HTTP Method: GET
    • Media types:
      • application/xml (Comments element)
    • Description: The list of comments at a specific page {version}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/comments/{commentId}

  • HTTP Method: GET
    • Media types:
      • application/xml (Comment element)
    • Description: A comment at a specific page {version}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

Attachments resources

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/attachments[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Attachments element)
    • Description: The list of attachments of a given page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/attachments/{attachmentName}

  • HTTP Method: GET
    • Media types:
      • The same of the attachment media type.
    • Description: The attachment identified by {attachmentName} on a given page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.


  • HTTP Method: PUT
    • Accepted media types:
      • /
    • Media types:
      • application/xml (AttachmentSummary element)
    • Description: Create an attachment identified by {attachmentName} on a given page.
    • Status codes:
      • 201: If the attachment was created.
      • 202: If the attachment was updated.
      • 401: If the user is not authorized.


  • HTTP Method: DELETE
    • Media types: 
    • Description: Delete the attachment identified by {attachmentName} on a given page.
    • Status codes:
      • 204: If the attachment was deleted.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/attachments[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Attachments element)
    • Description: The list of attachments at a given page {version}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/attachments/{attachmentName}

  • HTTP Method: GET
    • Media types:
      • The same of the attachment media type.
    • Description: The attachment identified by {attachmentName} on a given page {version}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/attachments/{attachmentName}/history

  • HTTP Method: GET
    • Media types:
      • application/xml (??? element)
    • Description: The list of available version for the {attachmentName}
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/attachments/{attachmentName}/history/{version}

  • HTTP Method: GET
    • Media types:
      • The same of the attachment media type.
    • Description: The {attachmentName} at a given {version}
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

Object resources

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Objects element)
    • Description: The list of objects associated to a page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.


  • HTTP Method: POST
    • Accepted media types:
      • application/xml (Object element)
      • application/x-www-formurlencoded (a set of property#name=value pairs representing properties and a field className)
    • Media types:
      • application/xml (Object element)
    • Description: Create a new object.
    • Status codes:
      • 201: If the object was created (The Location header will contain the URI associated to the newly created object).
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects/{className}[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Objects element)
    • Description: The list of objects of a given {className} associated to a page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects/{className}/{objectNumber}

  • HTTP Method: GET
    • Media types:
      • application/xml (Object element)
    • Description: The object of type {className} identified by {objectNumber} associated to the given page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.


  • HTTP Method: PUT
    • Accepted media types:
      • application/xml (Object element)
      • application/x-www-formurlencoded (a set of property#name=value pairs representing properties)
    • Media types:
      • application/xml (Object element)
    • Description: Modify the object properties.
    • Status codes:
      • 202: If the object was updated.
      • 401: If the user is not authorized.


  • HTTP Method: DELETE
    • Media types: 
    • Description: Delete the object.
    • Status codes:
      • 204: If the object was deleted.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects/{className}/{objectNumber}/properties

  • HTTP Method: GET
    • Media types:
      • application/xml (Properties element)
    • Description: The properties of the object of type {className} identified by {objectNumber} associated to the given page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects/{className}/{objectNumber}/properties/{propertyName}

  • HTTP Method: GET
    • Media types:
      • application/xml (Properties element)
    • Description: The property {propertyname} of the object of type {className} identified by {objectNumber} associated to the given page.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.


  • HTTP Method: PUT
    • Accepted media types:
      • application/xml (Property element)
      • text/plain
      • application/x-www-formurlencoded (a field property#name=value pairs representing a property)
    • Media types:
      • application/xml (Property element)
    • Description: Modify the object properties.
    • Status codes:
      • 202: If the object was updated.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/objects[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Objects element)
    • Description: The list of objects associated to a page at a given {version}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/objects/{className}/{objectNumber}

  • HTTP Method: GET
    • Media types:
      • application/xml (Object element)
    • Description: The object of type {className} identified by {objectNumber} associated to the given page at a given {version}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/objects/{className}/{objectNumber}/properties

  • HTTP Method: GET
    • Media types:
      • application/xml (Properties element)
    • Description: The properties of the object of type {className} identified by {objectNumber} associated to the given page at a given {version}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/history/{version}/objects/{className}/{objectNumber}/properties/{propertyName}

  • HTTP Method: GET
    • Media types:
      • application/xml (Properties element)
    • Description: The property {propertyname} of the object of type {className} identified by {objectNumber} associated to the given page at a given {version}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/class/{className}/objects

  • HTTP Method: GET
    • Media types:
      • application/xml (Objects element)
    • Description: The list of all the objects of a given {className}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

Class resources

/wikis/{wikiName}/classes[?start=offset&number=n]

  • HTTP Method: GET
    • Media types:
      • application/xml (Classes element)
    • Description: The list of all the classes defined in the wiki {wikiName}
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/classes/{className}

  • HTTP Method: GET
    • Media types:
      • application/xml (Class element)
    • Description: The {className} definition
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/classes/{className}/properties

  • HTTP Method: GET
    • Media types:
      • application/xml (Properties element)
    • Description: The properties of the class {className}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

/wikis/{wikiName}/classes/{className}/properties/{property}

  • HTTP Method: GET
    • Media types:
      • application/xml (Property element)
    • Description: The property {property} of the class {className}.
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.

Other resources

/wikis/{wikiName}/modifications[?start=offset&number=n&timestamp=t]

  • HTTP Method: GET
    • Media types:
      • application/xml (Modifications element)
    • Description: The list of the latest modification made to the wiki {wikiName} starting from time t (t is expressed in milliseconds from 1970 of the starting date)
    • Status codes:
      • 200: If the request was successful.
      • 401: If the user is not authorized.
Tags:
   

Get Connected