The body of the response for the Postman request should
look as follows:
Click here to view code image
{
"Token":
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1
Y2U3MTJiMDhlZ-
TY2MjAyZmEyZWI4ZjgiLCJhdXRoU291cmNlIjoiaW50ZXJuYWw
iLCJ0ZW5hbnROY-
W1lIjoiVE5UMCIsInJvbGVzIjpbIjViNmNmZGZmNDMwOTkwMDA
4OWYwZmYzNyJdL-
CJ0ZW5hbnRJZCI6IjViNmNmZGZjNDMwOTkwMDA4OWYwZmYzMCI
sImV4cCI6MTU2N-
jU5NzE4OCwidXNlcm5hbWUiOiJkZXZuZXR1c2VyIn0.ubXSmZY
rI-yoCWmzCSY486y-
HWhwdTlnrrWqYip5lv6Y"
}
As with the earlier curl example, this token will be used
in all subsequent API calls performed in the rest of this
chapter. The token will be passed in the API calls
through a header that is called X-Auth-Token.
Let’s now get a list of all the network devices that are
being managed by the instance of Cisco DNA Center that
is running in the always-on DevNet Sandbox you’ve just
authorized with. If you verify the Cisco DNA Center API
documentation on
https://developer.cisco.com/docs/dna-center/api/1-3-0-
x/, you can see that the API resource that will return a
complete list of all network devices managed by Cisco
DNA Center is /dna/intent/api/v1/network-device.
Figure 8-7 shows the online documentation for Cisco
DNA Center version 1.3.