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

Python Requests

kadirhan
Guide

 

 

 

import requests

URL = "https://gbmonitor/e/{tenand_id}/api/v2/activeGates/"
print("search by id : ")
id=input("> ")
queryURL = URL + f"{id}"
response = requests.get(queryURL, headers={'Authorization': "Api-Token " + "dt0c01.XXXXXXX"})
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 Guru
Dynatrace Guru

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.

Mike

Featured Posts