Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Deleted user August 22, 2022

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

0 votes
Deleted user August 22, 2022

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.

Deleted user August 22, 2022

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
Product Admin
TAGS
AUG Leaders

Atlassian Community Events