Download link for attachment history

Hi Atlassian,

I’m migrating Confluence V1 rest API to V2.
However, I can’t find a way to download an old version of the attachment.

In detail, Get attachments returns downloadLink in its response. But, Get attachment versions doesn’t return downloadLink.
Our app needs a way to download the attachment body of the old attachment.


1 Like

I tried Get attachment by id to get download URL of a historical version.
However, when I set the version query parameter, the API return 400 response with an error message.

{"errors":[{"status":400,"code":"INVALID_REQUEST_PARAMETER","title":"Only historical content can be fetched by version ('status=draft' cannot be used with 'version' parameter)","detail":null}]}

Hi @takafumiohtake, I can confirm using Get attachment by ID in combination with the version param would be the recommended way to go, but there is currently a bug with this endpoint and this use case.

We are working to get it fixed as quickly as possible, it can be tracked here: CONFCLOUD-76139

1 Like