Forums

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

Get macro body via REST API

Steve Li
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 2, 2021

I have a responses table macro to store submitted responses of a form. I wanted to extract the responses table macro body and I've used 

/rest/api/content{id}/history/{version}/macro/id/{macroId}

 

but the output I got has empty macro body. 

 {'name': 'responses-table', 'body': '', 'parameters': {'formId': {'value': 'my_response_table_name'}}, '_links': {'base': 'https://my_confluence_page_url', 'context': ''}}

I've also made sure the response table is not restricted to admin. Did I miss anything here?

 

2 answers

1 accepted

2 votes
Answer accepted
Sameer V
Contributor
April 7, 2021

You can get the html markup of the page using body.view.

http://example.com/confluence/rest/api/content/1234?expand=space,body.view,version,container 

0 votes
Alex Medved _ConfiForms_
Community Champion
April 2, 2021

I am pretty sure the data stored by the form is not stored within the page storage format and therefore the body is empty.

Cannot tell where do they store the actual data, but clearly not on the page itself (in the macro body)

Alex

Steve Li
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 2, 2021

I think the actual data is stored in the confluence form with a unique form id, but REST does not have endpoint to extract the confluence form either. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events