How to use REST interface to create a space/page instead of just a page?

We need to create a new page using XWiki’s REST interface. We already have a working solution to add page “beta" to an existing page “Labbook.jsnow.WebHome” using



<?xml version="1.0" encoding="utf-8"?>
<page xmlns:xsi="" xmlns:xsd="" xmlns="">
<authorName>John Snow</authorName>
<content>Groundbreaking research about beta.</content>

However, what we really want to create is “Labbook.jsnow.beta.WebHome” so that the new beta page can also have child pages. Can we change the page-xml above so that it also creates a “space” for beta? Many thanks in advance!

Hi @svollmar,

In order to create non-terminal pages using REST, you would use as many spaces as you want in you request (spaces/Labbook/spaces/jsnow/spaces/beta) and at the end use /pages/WebHome.

Hope it helps,

EXCELLENT - that was the solution - thank you!