DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

The Content-Type header needs to be
application/yang-data+json because JSON-
formatted YANG data models are exchanged over the
RESTCONF interface. The authorization header contains
the basic authentication Base64 encoded for the admin
username and the admin password. A snippet of the
response is shown in Example 15-6.


Example 15-6 Output of the RESTCONF GET Devices
API Call


Click here to view code image


{
"tailf-ncs:device": [
{
"name": "ios0",
"address": "127.0.0.1",
"port": 10022,
"authgroup": "default",
"device-type": {
"cli": {
"ned-id": "cisco-ios-cli-3.8:cisco-
ios-cli-3.8"
}
},
"commit-queue": {
"queue-length": 0
},
"active-settings": {
"connect-timeout": 20,
"read-timeout": 20,
"write-timeout": 20,
"ssh-keep-alive": {
"interval": 20,
"count": 3
},
"ned-keep-alive": {
"count": 3
},
... omitted output
}

The Cisco NSO RESTCONF interface can also be
explored by using Postman. For example, we can get the
configuration of the ios1 simulated device from the NSO
RESTCONF interface by using Postman instead of curl.

Free download pdf