cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1128
Views
0
Helpful
2
Replies

Coding 201: Parsing XML using Python - Issues with URL

donroger
Cisco Employee
Cisco Employee
2 Replies 2

BINODGUPTA7240
Level 1
Level 1

While making HTTP REST call with Python to the CMX MSE Server, i get the following error:

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1076)>

from urllib.request import Request, urlopen
req = Request('https://cmxlocationsandbox.cisco.com/api/contextaware/v1/maps/info/DevNetCampus/DevNetBuilding/DevNetZone')
req.add_header('Authorization', 'Basic bGVhcm5pbmc6bGVhcm5pbmc=')
response = urlopen(req)
responseString = response.read().decode("utf-8")
print(responseString)
response.close()

While browsing the URL directly, i get

Evaluation license has expired

https://cmxlocationsandbox.cisco.com/api/contextaware/v1/maps/info/DevNetCampus/DevNetBuilding/DevNetZone

 

I am learning REST API and need the valid URL. Please suggest any solution around.

 

SWeidner11
Level 1
Level 1

I am having this same issue/error in Coding 202: Parsing JSON. The URL has been updated in the lesson to point to 

"https://devnetapi.cisco.com/sandbox/mse/api/config/v1/maps/info/DevNetCampus/DevNetBuilding/DevNetZone"; however, the certificate for this server has expired as well. 
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1108)>