Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sample payload for attaching a file to an issue

Manem, Chandra Sekhar
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!
February 4, 2023

Hi

i knew that there are lot of answers to this, but since i am new to APIs not able to follow.

and i am using API Scan in tosca automation tool to send the POST request.

so please suggest me what is the exact payload to attach a file. 

FYI: i am using the below one

 { 
     "attachment" : {
                 "filename" : "c:\path\test.txt" 
         } 
 }

and source as : rest/api/2/issue/TEST-123/attachments

and the headers are :

Accept : application/json

X-Atlassian-Token : nocheck

 

Thanks

Chandra

1 answer

0 votes
Joseph Chung Yin
Community Champion
February 4, 2023

@Manem, Chandra Sekhar -

Welcome to the community.  Please take a look at the REST API document for adding attachment to an issue - https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post

Hope this may assist you.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Peter Gagne October 17, 2024

@Manem, Chandra Sekhar : did you ever get a basic payload like you provided as an example to work?

 

I'm having the same question and read the answer/link provided earlier, but I'm still struggling to get it working...

Suggest an answer

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

Atlassian Community Events