Hello,
I am probably being silly but following the Jira Cloud Rest API documentation (Python) for uploading an attachment to an issue I can't see where to specify the file - the below is the example code. Like I said might just be a long day but I am pulling my hair out!
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth import json url = "https://your-domain.atlassian.com/rest/api/3/issue/{issueIdOrKey}/attachments" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Accept": "application/json" } response = requests.request( "POST", url, headers=headers, auth=auth ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
Thanks
Peter.