Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,668
Community Members
 
Community Events
165
Community Groups

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

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 Feb 05, 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
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

378 views 2 11
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you