Created
April 19, 2022 15:48
-
-
Save eagleEggs/5ca7e60fefcfff2cd8091bfba6acde98 to your computer and use it in GitHub Desktop.
Zephyr Scale Server API v1 Attachment Upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = "DOMAIN/jira/rest/atm/1.0/testrun/CYCLE-ID/attachments" | |
payload={} | |
files=[ | |
('file', ('test.jpg', open('C://test.jpg', 'rb'), 'image/jpeg')) | |
] | |
headers = { | |
'Authorization': 'Bearer APIKEY' # or use BASIC auth | |
} | |
response = requests.post(url, headers=headers, data=payload, files=files, verify=False) | |
print(response) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment