Missed Team ’24? Catch up on announcements here.

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

How to upload an Email (.msg format) as attachment via REST API?

Dr. Carl Heckmann
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!
July 19, 2021

Hi Everyone,

 

I am trying to upload an email (.msg Outlook-Format) as attachment via REST API (https://[myservicedesk].atlassian.net/rest/api/3/issue/[TICKETID]/attachments).

 

The Content-Type is "application/vnd.ms-outlook". I receive an error message "415 Unsupported data type".

 

If I upload the same file manually via the User Interface it works. If I receive this attachment via API it shows the content-type "application/vnd.ms-outlook" - so apparently it is supported by JIRA.

image.png

 

Thanks for your help,

Carl

1 answer

1 accepted

0 votes
Answer accepted
Prince Nyeche
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.
July 20, 2021

Hi @Dr. Carl Heckmann 

Can you try to add these headers as key-value pairs on postman when uploading?

"Accept": "application/json"
"X-Atlassian-Token": "no-check"
Dr. Carl Heckmann
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!
July 22, 2021

 

Hi Prince,

 

thanks, but this didn't solve it. I already hat both headers in the request.

 

Best regards,

Carl

Prince Nyeche
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.
July 23, 2021

Hi @Dr. Carl Heckmann 

If those exist, can you go to the body tab on postman under form-data, select key as a file, and value should be the file you want to upload?

attachments.png

Like Dr. Carl Heckmann likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events