Forums

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

Getting Response Code 405 when trying to add attachments to JIRA via REST API

Harshit
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!
June 3, 2020

I'm trying to use the REST API to add an attachment to an issue in JIRA. I've been following the documentation, but I am getting response code 405 when I run the following code (this code is mentioned in the Jira Documentation).

url = "http://newp.atlassian.net/rest/api/3/issue/NP-4/attachments/"

auth = HTTPBasicAuth("example@mail.com", "<api-token>")

headers = {
"Accept": "application/json"
}

response = requests.request(
"POST",
url,
headers=headers,
auth=auth
)
print(response)

  Can anyone please help?

1 answer

0 votes
naveen_kumar
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!
June 4, 2020

I am also facing same issue, Please let me know if you find some solution :).

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events