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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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. 

1 answer

0 votes
Diego Atlassian Team Dec 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!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

146 views 0 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you