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

Jira Rest api download issues attachment

ankit February 8, 2023

This question may be already asked and I have gone through most of them and still facing the issue.

I am using c# sdk and trying to download attachments (pptx) from issue.

we are using enterprise server and want to download the attachments.

1. /rest/api/2/attachment/attachmentid  which returns the url of the pptx

2. /secure/attachment/{id}/{filename}

I am trying to download from this url but unfortunately it returns only the first 4kb of the file and saves. when I try to open file it says it is corrupted. 

can you please guide me how to download the attachment of the issue?

 

Edit:

I tried to download the file directly using the content link I get from 1st one

by passing Authorization: Basic {stringbase64} it returns 401 always. is there any other way to achieve this?

 

1 answer

0 votes
Prajwal Ashok Nagrale February 8, 2023

try this : /rest/api/3/attachment/content/{id}

ankit February 8, 2023

I tried that too, it returns 404

ankit February 8, 2023

@Prajwal Ashok Nagrale that returns 404

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events