I am trying to find a proper way to open a file attached to a Jira issue using the REST API (cloud and server platforms).
I managed to get the details of an issue including its attachments. For example, for a given issue I get the following attachment object.
{
"attachments": [
{
"self": "https://myinstance.atlassian.net/rest/api/3/attachment/12345",
"id": "12345",
"filename": "image.png",
"author": {...},
"created": "2025-10-05T15:09:46.973+0200",
"size": 15926,
"mimeType": "image/png",
"content": "https://myinstance.atlassian.net/rest/api/3/attachment/content/12345",
"thumbnail": "https://myinstance.atlassian.net/rest/api/3/attachment/thumbnail/12345"
}
]
}
My goal is to minimize the number of requests I make to the API in order to get the final URL of the attachment.
With this in mind I noticed that I can use the following URL to get an attachment:
https://myinstance.atlassian.net/secure/attachment/12345/image.png
Pasting this in the browser or using curl I’m able to get the file (assuming I’m logged in to Jira).
My question: is this a supported URL? I mean, using /secure/… Is this a proper way to download/view an attachment?
The advantage of this for me is that I can easy generate that URL from an attachment w/o having to make additional requests to the API in order to download or view the file.
Why all this? Because I’m implementing a tool that allows users to view issues and attachments from a terminal application. In this scenario, it would be great of I can access the final URL of an attachment w/o extra API requests (avoiding getting the attachment content, etc.)
Thanks for the help.
G.