Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get macro body via REST API

Edited

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

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 

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

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

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,777 views 8 32
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