Missed Team ’24? Catch up on announcements here.

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

How to copy a Confluence page via REST API at the right position?

Regis Bondidier March 13, 2015

Hi

I am able to copy a page via the REST API.

I can set the ancestor, but I can't set the position (above or below) other child.

All my created pages are sort in alphabetical order.

Is there a way to specify the right position?

 

6 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Joe Rodriguez December 21, 2015

I've figured out my issue but does anyone know how to copy images from one page to then next? My current code using powershell is this following $post = @{ type = 'page' title = $page.title space = @{ key = $destspace} body = @{ storage = @{ value = $page.body.view.value representation = 'storage' } } } $json = ConvertTo-Json $post

0 votes
Ladislav Gatial September 21, 2015

Hi, did you found the Answer to your Question ? I have the same Problem...

0 votes
Regis Bondidier May 25, 2015

Hi In python, something like this: payload = { "title":"<PAGE TITLE>", "type":"page", "space": { "key": "<SPACEKEY>" }, "body":{ "storage":{ "value":"<put your content of the page here>", "representation":"storage" } } } r = requests.post(URLserver + "/rest/api/content/", data=json.dumps(payload), auth=auth, headers=({"Content-Type":"application/json"})) Best regards

0 votes
Mark Wendell Jose May 24, 2015

Hello, how do you pass it in the payload of a post

0 votes
Regis Bondidier May 3, 2015

Hi Klaas, I use the REST API. Get the body.storage from a page, then passing it in the payload of a post. Change the space or change the page title if you copy in the same space. Best regards Regis

0 votes
Klaas Van Ammel April 29, 2015

Regis, What is your method to copy a page? I can only find an example on creating a page: https://developer.atlassian.com/confdev/confluence-rest-api/confluence-rest-api-examples#ConfluenceRESTAPIExamples-Createanewpage

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events