Python script:
import requests
from requests.auth import HTTPBasicAuth
import json
url = "https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}"
auth = HTTPBasicAuth("email@example.com", "<api_token>")
headers = {
"Accept": "application/json"
}
response = requests.request(
"GET",
url,
headers=headers,
auth=auth
)
#print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
DownloadURL = response.json()['comments'][0]["body"].split(' ')[3]
#print(DownloadURL)
Response Body:
DownloadURL is http:xxxx.zip
Before this, I need to click DownloadURL download it.
And now, I want to achieve automatic download.
Thx