I’m writing some code to create and maintain some pages on Confluence programmatically.
Creating the page is working. However, when the code wants to update that page, I’m getting an error 500 back from Confluence because exceptions are occurring in the processing of my data.
com.atlassian.confluence.content.redner.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 86. Parser message: Undeclared namespace prefix “ac”
I’ve following the steps in https://developer.atlassian.com/confdev/confluence-server-rest-api/confluence-rest-api-examples to use curl to do the same steps manually and I’m getting the same error. If I just change the method from PUT to POST, remove the page ID and change the page title, i.e. creating a page instead of updating the page, it works so the content itself doesn’t appear to be bad.
Has anyone successfully used the REST API to update an existing page that uses more complex content than just HTML?