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)?
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
Sorry by mistake i wrote something in the answer section. I am still searching for an answer from the community.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
May I know if you are referring to this?
https://confluence.atlassian.com/doc/edit-in-office-using-the-office-connector-170493096.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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">{"name":"Kopi af Kunder med og uden installationsaftale_161220_jk.xlsx","type":"xlsx","contextEntityId":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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check under these groups once
Under Each User check the group they are in
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.