Forums

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

Get value of macro from statusbar via REST

ankeli
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!
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_
Atlassian Partner
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
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!
April 8, 2020

Thanks, that helped.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events