How to download attachment via REST API?

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.

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 as well as the corresponding feature request.