Skip to content

Instantly share code, notes, and snippets.

@eagleEggs
Created April 19, 2022 15:48
Show Gist options
  • Save eagleEggs/5ca7e60fefcfff2cd8091bfba6acde98 to your computer and use it in GitHub Desktop.
Save eagleEggs/5ca7e60fefcfff2cd8091bfba6acde98 to your computer and use it in GitHub Desktop.
Zephyr Scale Server API v1 Attachment Upload
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