Details
-
Bug
-
Resolution: Fixed
-
Low
-
Severity 2 - Major
-
Description
Environment
- Confluence Cloud, Rest API
Steps to Reproduce
Try to create a page in the new editor using a body like:
curl -X POST \ 'https://instance.atlassian.net/wiki/rest/api/content?expand=body.atlas_doc_format' \ -H 'Accept: application/json' \ -H 'Authorization: Basic <my token>' \ -H 'Content-Type: application/json' \ -d '{ "title": "Test Page", "type": "page", "space": { "key": "EC" }, "status": "draft", "body": { "atlas_doc_format": {"value":"{\"version\":1,\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"Some text in a paragraph\"}]}]}"} } }'
and it returns a 200 and creates a page, but the body is left empty.
Expected Results
The body is what is passed in the API.
Actual Results
The body for the created page is empty.
Workaround
Instead of:
"body": { "atlas_doc_format": {"value":"{\"version\":1,\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"Some text in a paragraph\"}]}]}"} }
use:
"body": { "editor": { "value":"{\"version\":1,\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"Some text in a paragraph\"}]}]}", "representation":"atlas_doc_format" } }
which works.
Attachments
Issue Links
- relates to
-
CONFCLOUD-71194 REST API does not specify formats or representations for body content
- Closed