Forums

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

How to add an attachment to a JIRA issue using REST API

Kaustubh Dandale
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!
March 29, 2023

In the article, we can see that it is asking for a username and password. Where to find a Jira username and password?

 

https://confluence.atlassian.com/jirakb/how-to-add-an-attachment-to-a-jira-issue-using-rest-api-699957734.html

 

I need to hit the below API what could be the username / password here as I am using login with Google.

 

curl -D- -u {username}:{password} -X POST -H "X-Atlassian-Token: nocheck" -F "file=@{path/to/file}" http://{base-url}/rest/api/2/issue/{issue-key}/attachments

1 answer

1 accepted

0 votes
Answer accepted
Tansu Akdeniz
Community Champion
March 29, 2023

Hi @Kaustubh Dandale 

Welcome to the community!!

The api you shared is for server version. Please take a look at this Jira Cloud Rest Api Attachment doc.

You will use api token instead of user/pass. Manage API tokens for your Atlassian account

Suggest an answer

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

Atlassian Community Events