Hello .
Can someone help to rewrite a part of a python script in Dynatrace Synthetic using pre-script
here is the code of my python script .
Spoilerurl =“https://endpointhost/parent/R000057/v1/sent/status”
api_key = “xaaaaxxxxxaaaaxxxxxaaaazzz”
secret = “ZxxAAUUaa”
ts = time.time()
sign = api_key+secret+str(timestamp)
shen256 = hashlib.sha256(sign.encode())
finalurl = url+“?api_key=”+api_key+“&sig=”+shen256.hexdigest()
headers = {“User-Agent”:“Myapp/Python”}
response = requests.get(finalurl , headers=headers)
the difficulty is to rewrite the final url with the Epoch in combination with the key and secret .
i tryed many things but still not working .
any idea and help is welcome .
