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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira API Error when adding attachments Edited

Matt Liu I'm New Here Jul 09, 2021

I'm using NodeJS to try to POST a file as an attachment to the /rest/api/3/issue/{issueIdOrKey}/attachments endpoint as shown here.

Using CURL inside the command line successfully POSTs the file to the desired issue but it fails to do so inside NodeJS.

I've tried the formdata library along with the https, axios, and node-fetch libraries all to no avail. Each time I format the request accordingly to how it's specified in the documentation and all are returning 404 or 500 errors. Here are the snippets of code I'm trying.

Errors I get:

message: 'null for uri:',
'status-code': 404
500 Internal Server Error

Can anyone provide any insight to what I'm doing wrong or potential solutions? Thanks in advance.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

👁‍🗨 Confluence Team planning dashboard_Atlympics 🌈

Hi Atlassian's, How is your journey with #Atlympics 2021 so far....excited! Me too, same excitement. Here's my typical team planning and vision dashboard which I used to share to my management and ...

93 views 1 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you