Trying to create an HTML page using Confluence REST API
curl -X POST \
https://whatfix.atlassian.net/wiki/rest/api/content \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"type": "page",
"title": "My Test Page 15",
"version":{{"number":"1" }},
"body": {
"storage": {
"value": "<ac:structured-macro ac:name=\"html\" ac:schema-version=\"1\" ac:macro-id=\"74c5d460-d9c1-4259-9489-5ca2cea8314c\"><ac:plain-text-body><![CDATA[<div><ul><li><a href=\"#Domain1\">Domain1</a></li><li><a href=\"#Domain2\">Domain2</a></li><li><a href=\"#Domain3\">Domain3</a></li><li><a href=\"#Domain4\">Domain4</a></li><li><a href=\"#Domain5\">Domain5</a></li></ul></div><br/><div><table> <colgroup><col/><col/></colgroup><tr><th>Domain</th><th>System Count</th></tr><tr><td>Domain1</td><td>653</td></tr><tr><td>Domain2</td><td>2</td></tr><tr><td>Domain3</td><td>527</td></tr><tr><td>Domain4</td><td>2</td></tr><tr><td>Domain5</td><td>2</td></tr></table></div><br/>]]></ac:plain-text-body></ac:structured-macro>",
"representation": "storage"
}
}
}'
The error from dev console is
I could insert an html manually by using HTML Macro but not through the REST API.
Thanks in advance
I'm seeing the same thing. Did you ever find a solution?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.