I have done a lot of reading both here and in Stackoverflow. I still cannot make this work, and I am wondering if it is possible. I am using this example:
https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-update-a-page-with-Python-using-REST-API/qaq-p/480627
For some reason I can't reply on that page, so I am writing a new question here.
If I use the field:
'body': {
'storage':
{
'representation': 'storage',
'value': str(content)
}
}
where the content is:
<table><tbody><tr><th>H1</th><th>H2</th></tr><tr><td>column1</td><td>column2</td></tr></tbody></table>
This posts the string in content, i.e., it doesn't get formatted as a table - actually it adds a space between the tag elements.
Am I missing something, such as the 'html/body' elements in the string that I send in the storage/data field? I also tried adding these, and still it posts the actual string.
Thanks,
Dirce
PS: I also tried this simple html string: <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
and that also posts the string itself. So my problem is not about the table, but in figuring out what am I doing wrong in posting HTML so that Confluence will interpret it.