Reputation: 387
I'm trying to create new content page from confluence REST api.
Any page created with REST API show up in old editor view. I have tried editor2 option instead of storage and also i tried with metadata(Example), but no luck.
Is there any solution by which i can create page in new editor (v2) from REST API of confluence.
Upvotes: 0
Views: 683
Reputation: 1980
Found this example on Atlassian.net and it works for me:
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"
}
}
}
}'
Upvotes: 1