hey there!
my team is trying to updload confluence documents using a python script that uses the package atlassian-python-api (version 3.41.13) all was working as expected until I tried to add a warning banner/macros that I started to get some http errors. I tried using https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html (it talks about the data server version, but this is all the docs I found) and just adding a symbol (like `<ac:emoticon ac:name="warning" />`) makes it fail with the following errors
```
requests.exceptions.HTTPError: com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor format
```
Where can I find the correct docs or how can I achieve it?
Thank you!
Hi there,
I'm not familiar with atlassian-python-api, but from the error message, it looks like the API is attempting to convert the Content body from (presumably) Storage Format into Atlas Doc Format (ADF).
The XML structure <ac:emoticon ac:name="warning" /> that you've provided is the Storage Format. On the other hand, ADF would be in a JSON format.
I would suggest explicitly specifying which Format you're using when calling the API, ie, storage or atlas_doc_format.
To help with constructing the body content when calling the REST API, you could use this free app:
Once the app is installed in Confluence, you could:
You could analyze the saved format either in "Storage" or "ADF", and use it as a sample for your API calls. One advantage of using this app is that you could even make changes directly as Storage Format or ADF, and save directly to the page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.