While using Jira API to attach a file to an existing issue getting 500 Internal server error.

jporinchukutty July 11, 2024

Hi,

 

I am trying to use Jira API to attach a file to the issues we created by calling below AP

rest/api/3/issue/{Issue ID}/attachments

 

While doing so in postman getting 500 error, not sure what is the actual issue.

Please guide.

2 answers

1 vote
jporinchukutty July 14, 2024

Able to resolve the issue in Postman right now, modified content type as below and it worked.

 

Content-Type  -  multipart/form-data; boundary=<calculated when request is sent>

 

Thanks

0 votes
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2024

@jporinchukutty , Welcome to the Atlassian Community!

Have you added the special header: X-Atlassian-Token: no-check ?

The documentation about add attachment in Jira mention this special header to be included in your REST API call: The Jira Cloud platform REST API (atlassian.com)

Also generally 500 errors are associated with not being able to call the application server, check if you are using the entire url complete with the HTTPS protocol

jporinchukutty July 14, 2024

Thanks @Fernando Eugênio da Silva ,

 

I do provide X-Atlassian-Token: no-check, but still same error, URL as well same, able to call other api's for get and put.

 

Please suggest for any other chance for this error code in postman.

 

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events