Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,680
Community Members
 
Community Events
168
Community Groups

How to download attachments of the comments in issue using rest api?

I want to download the attachment which user has added to the comment in his issue.

 

I have used several API's like

1 ) https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-attachment-content-id-get

But got an error like "attachment Id" is not found.

 

Also, 

2 ) https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-get

Here, I got in "content" -> "attrs" -> "id"  -  But this "id" is not matching up with the attachment Id when I call number 1 API.

If any one have a different solution please share,

Thanks In Advance!!!

  

 

 

 

 

1 answer

Here I found something,

I can download it using https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get API.

I just have to pick the Id of attachments which I will get in the response if I call above API.

And use those Id's in https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-attachment-content-id-get this API.

If anyone found the other way around most welcome!!!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events