How to read the attachment file using the REST API

Meenakumari March 20, 2019

Hi,

I created page with some attachments in confluence space for my exploration activities. I tried to download attachments with this uri "https://xxx.atlassian.net/wiki/rest/api/content/xxxxx/child/attachment" by adding authentication headers but I am getting "Unable to connect to the remote server" error. I am hitting this uri from the windows application.

Note -  I can hit following uri without any issues.

https://xxx.atlassian.net/wiki/rest/api/content
https://xxx.atlassian.net/wiki/rest/api/content/xxxxx?expand=body.storage 

 

I tried with the browser (postman tool and chrome poster) it showing 200 OK as the status code. But in my application is not working. Kindly guide me on the same.

 

 

Thanks,

Meena

 

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2019

Hello Meena and welcome to the Community!

From our explanation, the API calls are being made fine within postman and chrome poster. But the interesting part is it is failing when attempting to use another application.

To find out why this is not working, we would need to see the response from your application. This will allow us to tell if it is a server side or client side error with more specific context into why it occurs.

Once we have the responses from the API calls, we should be able to find the cause.

Regards,
Stephen Sifers

Meenakumari March 27, 2019

Hi Stephen,

 

Actually the problem was some IP were blocked in my intranet. Now it was resolved. 

Response from the API was correct. I can able to download the attachment files. :)

 

Regards,

Meena

Like Stephen Sifers likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events