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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Is it possible to get attachments list from page macro via REST API?

I created a page that has a macro with attachments from another page.  I used this JSON to do it:

{
"type": "page",
"ancestors": [{"type": "page", "id": 11111111}],
"title": "Page Title 1",
"space": {"key": "KEY"},
"body": {
"storage": {
"value": "<ac:structured-macro ac:name=\"attachments\">\
<ac:parameter ac:name=\"old\">false</ac:parameter>\
<ac:parameter ac:name=\"patterns\">*</ac:parameter>\
<ac:parameter ac:name=\"sortBy\">name</ac:parameter>\
<ac:parameter ac:name=\"page\">\
<ac:link>\
<ri:page ri:content-title=\"Page/001\"/>\
</ac:link>\
</ac:parameter>\
<ac:parameter ac:name=\"sortOrder\">ascending</ac:parameter>\
<ac:parameter ac:name=\"upload\">true</ac:parameter> </ac:structured-macro>",
"representation": "storage",
}
},
}

On the browser, it works ok but is it possible to get a list of these attachments via REST API? When I'm using "Get macro body by macro ID" endpoint I'm getting only information about this macro like what's its name or parameters, but "body" is empty. How can I get any information about these attachments?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Get to know the Confluence team!

Go “behind the screen” to meet some of the Confluence Cloud team. In this video series, we tackle some of the hard-hitting questions you never knew you wanted the answer to!  Meet some of the ...

236 views 0 10
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