-
Type:
Suggestion
-
Resolution: Unresolved
-
None
-
Component/s: System Administration - Configuration Tool
-
None
I am using python to post a snapshot file to the deployments url of our local hosted Jira data center. I was trying to use the PUT from these instructions:
https://docs.botronsoft.com/cmj/api/rest/1.3/#
I am using Jira version 8.20.1
I already ran the POST and got an id. Now I am trying to PUT to that id with the file in Python3 but am having no luck.
files={"file": open(filename, "rb")}
url="/deployments/2/content"
if I call put(url, files=files) with no header I get a 415 error
if I pass the header like this:
headers={"Content-Type": "mutlipart/form-data"}
put(url, files=files, headers=headers) I get a 500 error
Same issue when I try these settings for file as well.
files={"attach": open(filename, "rb")}
files={"attach": (filname, open(filename, "rb"))}