Figure 8-7 Cisco DNA Center Platform API
Documentation (https://developer.cisco.com)
With all this information in mind, you can craft the curl
request to obtain a list of all the network devices
managed by the Cisco DevNet always-on DNA Center
Sandbox. The complete URL is
https://sandboxdnac2.cisco.com/dna/intent/api/v1/net
work-device. You need to retrieve information through
the API, so we need to do a GET request; don’t forget the
X-Auth-Token header containing the authorization
token. The curl command should look as follows, and it
should contain a valid token:
Click here to view code image
curl -X GET \
https://sandboxdnac2.cisco.com/dna/intent/api/v1/network-
device \
-H 'X-Auth-Token:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
eyJzdWIiOiI1Y2U3MTJiMDhlZTY2MjAyZmEyZWI4ZjgiLCJhdXRoU291c-
mNlIjoiaW50ZXJuYWwiLCJ0ZW5hbnROYW1lIjoiVE5UMCIsInJvbGVzIjpbI-
jViNmNmZGZmNDMwOTkwMDA4OWYwZmYzNyJdLCJ0ZW5hbnRJZCI6IjViNmNmZG-
ZjNDMwOTkwMDA4OWYwZmYzMCIsImV4cCI6MTU2NjYwODAxMSwidXNlcm5hbWUiOi-
JkZXZuZXR1c2VyIn0.YXc_2o8FDzSQ1YBhUxUIoxwzYXXWYeNJRkB0oKBlIHI'