/issue method returns invalid attachment URL

Set up: Jira Cloud, OAuth 3LO app

Issue: When I call e.g. https://api.atlassian.com/ex/jira/{{id}}/rest/api/3/issue/{{issue_id}} then all URLs in the result are formatted as displayed by the self node except for content node which use the (wrong?) URL scheme. Example:

RIGHT: "self": "https://api.atlassian.com/ex/jira/{{id}}/rest/api/3/attachment/nnn"

WRONG: "content": "https://xxyyzz.atlassian.net/secure/attachment/nnn/image.png"

Problem: the image cannot be accessed using the URL inside the content node.

Workaround: change the content URL into https://api.atlassian.com/ex/jira/{{id}}/secure/attachment/nnn/image.png

Is the workaround the official way? Or is this a bug and should content return the fixed URL? Or is there a way to access (that is download) the attachment using the content URL that I don’t know of?

Note: I can’t resort to using an API token, basic authentication, or username/password authentication. Everything has to go by the books using OAuth.

Hi @hackteck,

Thanks for flagging this. The returned attachment content URLs should be based off https://api.atlassian.com/ex/jira/{cloudId}. I’ve created https://ecosystem.atlassian.net/browse/ACJIRA-2136.

Regards,
Dugald

2 Likes