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

How do we consume the content of MS Office attachments (added through macro) in a wiki page?

In the recent version upgrade of 7.9 in confluence on-premise solution we are not able to consume the HTML content data of an attachment from a wiki page through simple GET request or by calling wiki REST API end point. The first time we are getting only the tag content as "Loading" and I believe that we need to call a separate end point for fetching the content of the attachment that has been added through Wiki macro.

Can you please suggest a guide which I can follow how to construct the second API end point for fetching the content of different attachments of office software (added through macro)?

4 answers

0 votes
Pramodh Community Leader Feb 05, 2021

Check under these groups once

Atlassian Group.png

 

Under Each User check the group they are in

User Web UI.png

Thanks,
Pramodh

Pramodh Community Leader Feb 05, 2021

FYI,

They should not be under administrators, site-admins.

So Pramodh,

You are suggesting that it could be an access problem that is preventing us to get the content of the attached files in HTTP GET request of a wiki page?

Pramodh Community Leader Feb 05, 2021

Sorry got confused with the wrong Post!

Or you mean to say that some user who is in an administrator group will have this issue? whereas an user who is not in administrator group will get the content of attached files in the first HTTP GET call itself?

Pramodh Community Leader Feb 05, 2021

I will try to see what the issue and respond, sorry for posting on a different question.

Thanks Pramodh, it will be great if you can look into my issue as it has brought a road block on our web portal delivery. Earlier we used to get the entire HTML content of a wiki page (containing the office attachments) in a single call. After version upgrade all attachments are getting replaced by a tag with content as "Loading" in the HTML file of the wiki page.

Pramodh Community Leader Feb 05, 2021

And can you please give the REST API endpoint you are using

This is a simple HTTP GET request to any confluence or wiki page which contains a office document as attachment. In the HTML reply of the GET call we are not getting the content of the office attachment document like word, spreadsheet etc.

For example the below call:

GET http://xxxx.yyy.dk:{port num}/display/OYYZ/Positivlisten HTTP/1.1
Authorization: Basic xxxxxx

 

In the wiki page http://xxxx.yyy.dk:8090/display/OSDO/Positivlisten we have a spreadsheet attached. In place of spreadsheet content we are getting a content like below:

<p><div class="converter-macro-ajax-container conf-macro output-block" data-hasbody="false" data-macro-name="viewxls"><div style="display: none;" class="converter-macro-parameters">{&quot;name&quot;:&quot;Kopi af Kunder med og uden installationsaftale_161220_jk.xlsx&quot;,&quot;type&quot;:&quot;xlsx&quot;,&quot;contextEntityId&quot;:328811111}</div><div class="aui-card"><p class="title"><strong>Loading <span class="converter-macro-file-name"> </span></strong></p><aui-spinner size="medium"> </aui-spinner></div></div></p><p><br/></p><p><br/></p>

It looks like we may need to make a separate GET HTTP GET call to fetch the content of the spreadsheet. This was not the behavior before the version upgrade of Wiki. We used to content in a sinle call of HTTP GET.

Sorry by mistake i wrote something in the answer section. I am still searching for an answer from the community.

0 votes
Pramodh Community Leader Feb 05, 2021

Hi @Subhas Acharaya - TCS 

I checked, here's my solution.

You have to either use an attachment URL to get the data of each attachment in the page.

From API, 

GET /rest/api/content/{id}/child/attachment

Please refer to this API doc

https://docs.atlassian.com/atlassian-confluence/REST/5.8.4/#d3e2

Thanks,
Pramodh

Suggest an answer

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

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

198 views 0 6
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