I need to create a confluence page via the REST API. Creating a simple page is working, however if I try to add content to an existing HTML page I get http_response 400 (bad request).
Code snippet:
confluence_page_content = File.open("local_html_report", "r").read
json_data = {
"body" => {
"storage" => {
"representation" => "storage",
"value" => "#{confluence_page_content}"
}
},
"space" => {
"key" => "#{test_parameters["confluence_space"]}"
},
"title" => "TestPageFromChef",
"type" => "page"
}.to_json