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

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events