Get value of macro from statusbar via REST

ankeli April 7, 2020

Hi all,

I am trying to write a program that shall collect data from a statusbar (a table combining information like ID, version, status). I can get the content of the whole page via REST, can identify the table defining the statusbar, get the table headers - but I have some issues with getting the values for each field.

 

Each field in the status table looks like this in the confluence storage format

<td>
<div class="content-wrapper">
<p><ac:structured-macro ac:name="reqinfo" ac:schema-version="1" ac:macro-id="123456789-abcde"><ac:parameter ac:name="property">Modified By</ac:parameter></ac:structured-macro></p></div></td>

 

'for this example, the value displayed when viewing the page would be a user name. Is it possible to get the user name hidden in the macro above based on the confluence storage format / export via REST?

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Sven Schatter _Lively Apps_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 7, 2020

Hi @ankeli,

have you tried adding the parameter "&expand=body.view" to your REST url? This should give you the rendered version.

If you can't do that you could also send the relevant storage format to the convert content body REST API to render it.

Hope this helps! :)

Cheers,
Sven

ankeli April 8, 2020

Thanks, that helped.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events