Extreme API with Python
Table Of Contents
- 1 Preface
- 2 Introduction
- 3 EXOS APIs
- 4 VOSS API
- 5 XMC API
- 6 ExtremeCloud IQ API
- 7 Extreme Campus Controller API
Extreme API with Python
Page | 137
Part no.9036931-00 Rev AA February 2021
One way to obtain this information using Python is shown here:
import os
import requests
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
xcclogin = os.environ.get('xcclogin')
xccpassw = os.environ.get('xccpassw')
baseURL = 'HTTPS://192.168.20.90:5825'
auth_url = baseURL + '/management/v1/oauth2/token'
auth_body = {'grantType': 'password', 'userId': xcclogin, 'password': xccpassw}
r = requests.post(auth_url, verify=False, json=auth_body)
bearerToken = r.json().get('access_token')
myHeaders = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + bearerToken
}










