The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API: How to create page that gets the new editor?

Jan Hellmich
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 9, 2020

I'm trying to use the REST API to create a confluence page that uses the new editor.

Currently, pages that I create via the UI have the new editor. I took one of those pages and used the GET EP for the content `/wiki/rest/api/content/$pageId?expand=body.editor2` (https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-api-content-get) to get the editor representation of that page.

When I use the POST variant of the API (https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-api-content-post)  to create a new page with the body value exactly what was returned from the initial get request and choosing the `editor2` representation, the page created is using the old editor and gives me a "Convert to new editor" button. 

Do I need to set some other parameters that I'm unaware of or is `editor2` not the representation that maps to the new editor? 

Thanks for the help. 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 11, 2020

Hello @Jan Hellmich !

As I understand, you need to create pages via REST API and you also need those pages to be on the New Editor rather than the Legacy one.

Some time ago I dealt with a pretty similar need and pointed them in the direction of someone who had already achieved this. You can take a look at my thread here:

Let us hear from you!

isaaclea@idir
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 29, 2024

Just note that the approaches above for the V2 API are workarounds due to limitations, not solutions.

The solution would be for the V2 create API to support specifying what editor to use but currently it does not support that


DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events