AnsweredAssumed Answered

I am trying to add attachment to JIRA cards using JIRA API, I’m referring available document for addAttachment API.   As expected API is returning 200 response code but no attachment added to JIRA card

Question asked by saumya_Pandey168 on Jul 19, 2018
Latest reply on Aug 8, 2018 by tsuyu04

I am trying to add attachment to JIRA cards using JIRA API, I’m referring below document for addAttachment API.

https://developer.atlassian.com/cloud/jira/platform/rest/?_ga=2.266257802.480460066.1531821316-547560940.1531821316#api-api-2-issue-issueIdOrKey-attachments-post


Headers as below:

X-Atlassian-Token:no-check

Content-Type:application/json

 

Request param: file=@C:/Program Files/CA/DevTest/Projects/CHARMR3_API/Tests/Results/get_hier_01_2018-07-05_negative.html

 

Content Type: multipart/form-data; boundary=--gc0p4Jq0M2Yt08jU534c0p

As expected API is returning 200 response code but no attachment added to JIRA card. No JSON response as well.


May be the boundary value I gave in contentType could be wrong. Attached is the HTML file needs to be attached, can anyone please suggest the solution?

 

I am able to perform few other updates using JIRA APIs mentioned in above shared link.

Outcomes