Create new page via REST API on behalf of other users

Hi all,
First of all, thanks for creating and supporting such great software as XWiki!
I’m trying to migrate our old wiki system from Mindtouch to XWiki and I came across few problems.

I decided to create pages through the REST API but I’m unable to assign their ownership and some other properties to the data I send.

For example I send following PUT request to http://localhost:8500/rest/wikis/xwiki/spaces/Sandbox/pages/test with basic authentication. I’d like this new test page to be seen as created by user on specified created date (this user exists in the system).

<?xml version="1.0" encoding="utf-8"?>
<page xmlns:xsi="" xmlns:xsd="" xmlns="">
	Hello World!

Unfortunately, in response I get:


where my_username is obviously me.

Is there any way to override this properties with the data submitted in the request? If not - do you see any other way to import pages from other system?

The REST API does not allow this override, only the protected API allows it so you will need to pull data instead of pushing them.

The current standard way of importing data from another system is to implement a input filter for it. There is some general documentation on but the best right now is to look at example listed on that page.

Basically the idea is to create a component which is given an output filter and configurable properties (can be pretty much anything) and translate the (in this case Mindtouch) data into generic SAX-like “events” (start a document, start an object, add an attachment, end a document). Then if someone wants to import Mindtouch data in a running instance of XWiki the generic Filter application can be used with “Mindtouch” as input and “XWiki Instance” as output.

1 Like

Thanks a lot for this clarification. I will look further into this input filter extension. Perhaps it would be possible to fork some of the existing modules to work with Mindtouch. Thanks again and have a great day!