ryanzec
ryanzec

Reputation: 28040

Using Jira's API to add an attachment to an issue

I was wondering if Jira's REST API supports the ability to add an attachment to an issue (existing or new) along with uploading the attachment too? Looking at the API documentation I did not see anything however maybe i missed something.

Upvotes: 0

Views: 3181

Answers (3)

Raghwendra Sonu
Raghwendra Sonu

Reputation: 778

in Python:

jira = JIRA(options="Jira_Server_URL", basic_auth=("userID", "Password"))
jira.add_attachment(issue=issue, attachment="attachment_path")

Replace Jira_Server_URL, userID, Password and attachment_path accordingly.

Upvotes: 0

gareth_bowles
gareth_bowles

Reputation: 21130

This looks like the method you're after:

http://docs.atlassian.com/jira/REST/latest/#id339692

Upvotes: 1

Ruchi
Ruchi

Reputation: 1236

After you create the issue, you can click on more actions tab of that particular issue.

You would be able to attach files and attach screenshot.

Correct me if I am wrong in understanding your requirement.

Thanks.

Upvotes: 0

Related Questions