Should I expect the following cURL command to work?
curl -X POST \
'https://hello.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": "blogpost",
"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\"}]}]}"}
}
}'
When I run the command it does create a page, but it is an empty page with no content. The response I get contains a body like this:
{
"atlas_doc_format": {
"value": "{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\"}],\"version\":1}",
"representation": "atlas_doc_format",
"_expandable": {
"webresource": "",
"embeddedContent": "",
"mediaToken": "",
"content": "/rest/api/content/521884316?status=draft"
}
}
}
Should I expect to be able to create content, in Confluence Cloud, using ADF, via the REST API?