cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Python Requests

kadirhan
Contributor

 

 

import requests

URL = "https://gbmonitor/e/21d49f92-6f64-40d7-8b16-31a4ab5992a7/api/v2/activeGates/"
print("search by id : ")
id=input("> ")
queryURL = URL + f"{id}"
response = requests.get(queryURL, headers={'Authorization': "Api-Token " + "dt0c01.P2QSCVFQH4WJNKOQA4T4OCG4"})
print(response.text)

 

 

 

I'm probably making a mistake in the request part, I wonder how it will be, the error I get is:

 

kadirhan_0-1650972882245.png

 

 

1 REPLY 1

Mike_L
Dynatrace Champion
Dynatrace Champion

The SSL certificate on that AG/host is probably for a different DNS. Try setting verify=false in the get and see if that helps.