How can i download an Excel from Page with Rest API.

I have tried successfully  updating an excel attachment in conflunecn page using

""#REST Call in Python

headers = {
    'X-Atlassian-Token': 'nocheck',
    files = {
        'file': (filePath, open(filePath, 'rb')),
    data={"comment":"testing rest"}
    response ='http://conflunec server:port/rest/api/content/pageID/child/attachment/attachmentID/data', data=data,headers=headers, files=files, auth=('username', password))


But can i download the same Excel using REST api calls??

*Confluence version 6.3.3.

2 answers

1 accepted

This widget could not be displayed.

hey Thanks Ann,

I do have found the Solution..goes like this


import requests,os;
response = requests.get('http://conflunec_server:port/download/attachments/attachmentID/attchment_Name.xlsx',
    auth=('username', password'))


Ann Worley Atlassian Team Jan 23, 2018

I appreciate your letting us know - it could help the next person who wants to download an attachment using the API.

This widget could not be displayed.
Ann Worley Atlassian Team Jan 22, 2018

Hi Mahesh,

I understand you can update an Excel attachment using REST but you would like to know how to also download an attachment from Confluence using REST. Please see: confluence pages - get attached files via REST API As there are a couple of strategies described there.



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

567 views 7 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you