You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I have a comment on an Issue which has an image attached to the comment. I cannot find a way to get the URL of the image or to download the contents of the image. The comment API returns a JSON object describing the different sections of the comment. The section which holds the image attachment is described like this:
{
'type': 'media',
'attrs': {
'width': 924,
'type': 'file',
'id': '3b8c8cc8-0a4d-492a-8e1c-18214dc2afee',
'collection': '',
'height': 504
}
}
It seems the ID given here has no use. This is not the ID that is expected by the comment API. The comment API expects an integer for ID.
At the issue level, the API will return fields -> attachment -> list of attachments. This list will include the attachment for the image that is used in the comment. However, there is no information to know which attachment is for which comment image. This is because the IDs in the 'attachment' array are integers (e.g. 10010) and not the GUID-like ID that is given from the comment API.
Here is the same image from above as conveyed in the issue->field->attachment, with no way to know they are the same image or attachment:
'content': 'https://api.atlassian.com/ex/jira/000/..../rest/api/3/attachment/content/10010',
'created': '2022-04-18T19:48:49.244-0400',
'filename': 'Screen Shot 2022-04-16 at 2.37.09 PM.png',
'id': '10010',
'mimeType': 'image/png',
'self': 'https://api.atlassian.com/ex/jira/000/..../rest/api/3/attachment/10010',
'size': 96722,
'thumbnail': 'https://api.atlassian.com/ex/jira/000/..../rest/api/3/attachment/thumbnail/10010'},
From the Comment API, does the "content" attribute include text for a link to the attachment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.