# How to download attachment via REST API?

**URL:** <https://community.developer.atlassian.com/t/how-to-download-attachment-via-rest-api/83378>\
**Category:** Confluence Server\
**Created:** [September 10, 2024, 6:25pm UTC](https://community.developer.atlassian.com/t/how-to-download-attachment-via-rest-api/83378 "2024-09-10T18:25:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HDo](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@HDo](https://community.developer.atlassian.com/u/HDo)\
**Post date:** [September 10, 2024, 6:25pm UTC](https://community.developer.atlassian.com/t/how-to-download-attachment-via-rest-api/83378/1 "2024-09-10T18:25:47Z")

</div>

Hello,

On Confluence Cloud I know I can use **/wiki/rest/api/content/{pageID}/child/attachment/{attachmentID}/download**  
to get the attachment.

However, trying to replicate this on a Confluence Server  
**/confluence/rest/api/content/{pageID}/child/attachment/{attachmentID}/download**

I am getting a 404 error, and I know my attachmentID is correct because I was able to get it from  
**/confluence/rest/api/content/{pageID}/child/attachment**

Is there anything I am missing?

Thank you.

---

<div class="post-metadata">

**Author:** ![anon96974232](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@anon96974232](https://community.developer.atlassian.com/u/anon96974232)\
**Post date:** [September 10, 2024, 9:03pm UTC](https://community.developer.atlassian.com/t/how-to-download-attachment-via-rest-api/83378/2 "2024-09-10T21:03:50Z")

</div>

Hello @HDo

A 404 error is the expected behaviour, since there never was an attachment download endpoint for Confluence Server.

Refer to the [REST API documentation](https://docs.atlassian.com/ConfluenceServer/rest/8.9.3/#api/content/%7Bid%7D/child/attachment) as well as the corresponding [feature request](https://jira.atlassian.com/browse/CONFSERVER-94115).
