Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Scriptrunner - JIRA REST Endpoint to download attchments.

Abin Jacob
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2023

Currently, there are no rest APIs available to download a Jira attachment. Can somebody explain me how to create a custom rest endpoint to download an attachment by calling the rest call and giving the parameters issue id and attachment id?

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 28, 2023

Welcome to the Atlassian Community!

You can use the "get content" REST call to get the attachment - see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-group-issue-attachments but you do need to do a bit of messing around to get the file name and work out what the attachment id is (you'll need to do that messing around in a REST endpoint too)

TAGS
AUG Leaders

Atlassian Community Events