Hello,
Recently I've noticed that if you create for example Blank or Personal space in Confluence Cloud manually, i.e through Create space dialog it will create new space with "modern/new" editor (probably it's called editor-v2).
However I am wondering, when creating new space using REST API it will still create space with "old" editor - is that by default or there's some parameter which needs to be specified in API request in order to get new editor when creating space using REST API ?
curl --user user@name.net:someAPIToken --request POST --url 'https://myConfluenceInstance.atlassian.net/wiki/rest/api/space' --header 'Accept: application/json' --header 'Content-Type: application/json' --data {
"key":"My New Space",
"name":"test 123",
"description":{
"plain":{
"value":"some value",
"representation":"some representation"
}
}
}
Here's an example where you can see the difference between "old" and "new" editor:
Old editor
New editor
you need to define metadata
something like this
"body": {
"storage": {
"value": "<h1>Test page</h1>",
"representation": "storage"
},
"metadata": {
"properties": {
"editor" : {
"value" : "V2"
}
}
}
you can search in the forum and you will get more details.
The value should be v2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's a complete and cleaned-up example for creating a new-style page:
curl -u 'user:apitoken' -H 'content-type: application/json' \
'https://hello.atlassian.net/wiki/rest/api/content' \
-d '{
"type": "page",
"title": "Page created via API",
"space": {
"key": "TEST"
},
"body": {
"storage": {
"value": "<h1>Test page</h1>",
"representation": "storage"
}
},
"metadata": {
"properties": {
"editor": {
"value": "v2"
}
}
}
}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you! This would be great to have in the REST documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the equivalent of this for the new v2 api `wiki/api/v2/pages`? I'm not able to get this to work with the new API. Please point me to the documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Robin Stocker Thanks but since we are not supposed to use the old API now. Is there a way to do this in new API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Robin Stocker - Hey, following up on this also. I can't seem to find a way to do this with the API v2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Shannon S - I see you were active on this thread a few years back and are on the Atlassian Team. I have the same question as the folks above: is there an equivalent for the v2 API to select the new editor experience?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello there,
Welcome to Atlassian Community! It's nice to have you.
Right now I believe this depends on the Cloud site itself, so it's something we'll need to take a look at in support for your instance. Can you see if you're able to create a support ticket, and if not, let me know and I can take care of that for you?
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Shannon !
I've created support ticket and hopefully it will get resolved.
Thank you for your help.
Best regards,
A.L
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome! Let us know what you find out!
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted] could you solve this issue? I'm dealing with a similar problem. Any pages created via REST API show up with the old editor experience. Is there any parameter to set in the request?
Here is an example REST request.
POST {{host}}/rest/api/content
Accept: application/json
Content-Type: application/json
Authorization: Basic {{basic-auth-token}}
{
"title": "Test page 1",
"type": "page",
"space": {
"key": "MCT"
},
"status": "current",
"ancestors": [
{
"id": "54755348"
}
],
"body": {
"storage": {
"value": "<h1>Test page</h1>",
"representation": "storage"
}
}
}
I tried to set both "storage" to "editor2" but that did not change anything. When the user edits the page, the old editor is showing up. How can the new editor be used for pages created via REST API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lukas, @Waldemar Reusch, @Pete Dunham,
Xe was able to log a case with support, where we had a look at their site and determined that this was caused by the following bug:
Currently, there is no workaround for this. Please make sure to click This affects my team so you can be updated in the future if that changes.
Take care,
Shannon
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.
Hello @naveenkumar_dp ,
Thank you for following-up here! I'm not sure if you saw, but this has been logged as the following bug:
There's a workaround explained on that case.
If you have any trouble with it, can you let us know?
Thank you,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Shannon S all those answers are not answering the question of the ticket creator. How do I select the new editor v2 when creating a completely new SPACE. When I tried to add meta data, still the "Overview" page of the created space is in v1 editor. Do you have also a workaround for this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lars,
Thank you for pointing that out. The same applies in both situations, whether you're creating a single page or a space, thus creating multiple new pages at once. When there's a difference in the editor used, it's specific to the Cloud site and will require a support ticket to determine.
I know of a bug where when someone creates a Jira space, the overview page is on the legacy editor. There may be similar cases for other types of spaces, but I'm not yet aware of those. I'll share my example below.
CONFCLOUD-69729 Creating new space associated with the project through JSD has Overview page in the old editor
If you encounter a similar issue but not with a JSD space, can you send that to support using the support contact form? If you have a free account or are on an account type that doesn't allow for that, create a new question here on Community, tag me on it, and I'll help report that to the Cloud team.
Thank you, and take care!
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm also interested in a solution.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.