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

Kaustubh Dandale 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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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