The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Page properties report via REST fails to deliver value if it's a code block

Thomas Karcher
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 7, 2021

Dear Sir or Madam,

for automation purposes I access the page properties REST interface /rest/masterdetail/1.0/detailssummary/lines to get the values of page properties, like so:

curl -H "Authorization: Bearer <my personal access token>" -G "https://confluence-test.jimed.qmsaas.de/rest/masterdetail/1.0/detailssummary/lines?cql=id+IN+%2850495497%29&spaceKey=%7EThomas+Karcher"

where '50495497' is a page that I prepared with a page property block. Within that block there is a property with a value inside a code block. The storage source code of that particular line in the table looks like this:

<tr>
<td colspan="1">Testcodebash</td>
<td colspan="1">
<div class="content-wrapper">
<p class="auto-cursor-target"><br /></p><ac:structured-macro ac:name="code" ac:schema-version="1" ac:macro-id="e5172597-feb9-4088-9c92-c476cb350852"><ac:parameter ac:name="language">bash</ac:parameter><ac:parameter ac:name="title">bashtest</ac:parameter><ac:plain-text-body><![CDATA[!#/bin/bash
echo test]]></ac:plain-text-body></ac:structured-macro>
<p class="auto-cursor-target"><br /></p></div></td></tr

When accessing a page with the page properties report macro, everything is fine. When accessing the REST interface, the page doesn't show up in the results. As soon as I remove that line in the table, the page appears in the REST results.

How can I fix this?

Avoiding the code block is not up to me ...

Regards

Thomas

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Pramodh M
Community Champion
February 5, 2022

Hi @Thomas Karcher 

Can you try adding the code block adding manually and then adding the raw data you get from the page and adding this in API Call?

Storage Format.png

TAGS
AUG Leaders

Atlassian Community Events