I have a page that I created using REST API, but it is getting created in root. I want it to be moved under a space hierarchy and also moved as a child item of one of the other page. I am using Powershell REST method and would like an example...
To get the page to be created as the child of another page, you need to fill in the "ancestors" key:
Hi Tejas,
Invoke-RestMethod -Uri ("http://localhost:8080/confluence/rest/api/content/3604482") -Method Put
-Headers 'Content-Type: application/json' $Credentials
-Body '{"id":"3604482","type":"page","title":"new page","space":{"key":"Space you need to move to"},"body":{"storage":{"value":"<p>This is the updated text for the new page</p>","representation":"storage"}},"version":{"number":2}}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.