Extreme API with Python

Table Of Contents
Extreme API with Python
Page | 28
Part no.9036931-00 Rev AA February 2021
2.8 HTTPS with Python
Usually, when you work with an API that uses HTTP as the transfer protocol, such as REST API, you will
be required to use HTTPS for obvious security reasons. If you are using self-signed certificates, you will
see warnings and errors. To avoid this, in the code, add the disable_warnings method from Urllib3 and
add the verify=False argument with requests.
import requests
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
r = requests.get(url, verify=False, params=payload, headers=getHeaders)