Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I move page in confluence from root to a space using powershell ?

Tejas Shah April 4, 2016

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...

2 answers

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2016
0 votes
Aleks Yenin (Polontech)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2016

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}}'

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events