Join Keith as he demonstrates enabling and verifying RESTCONF from the CLI and Postman.
Previous 8 Minute Video 👉 • What is a REST-based A...
CURL or even better Postman.
Router config:
conf t
username admin priv 15 secret Cisco!23
ip http secure-server
ip http authentication local
restconf
int gig 1
ip add 192.168.1.56 255.255.255.0
no shut
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
ip route 0.0.0.0 0.0.0.0 192.168.1.1
router eigrp 1
net 0.0.0.0
end
debug ip http ssl error
remember authentication/authorization
-user "admin:Cisco!23"
remember header:
Content-Type:application/yang-data+json
See the video for the details.
GET:
192.168.1.56/restconf/
192.168.1.56/restconf/data/netconf-state/capabilities
{{host}}/restconf/data/netconf-state/capabilities
192.168.1.56/restconf/data/Cisco-IOS-XE-native:native/
192.168.1.56/restconf/data/Cisco-IOS-XE-native:native/router/
192.168.1.56/restconf/data/Cisco-IOS-XE-native:native/router/router-ospf
192.168.1.56/restconf/data/Cisco-IOS-XE-native:native/interface/
192.168.1.56/restconf/data/Cisco-IOS-XE-native:native/interface/
192.168.1.56/restconf/data/ietf-interfaces:interfaces
192.168.1.56/restconf/data/Cisco-IOS-XE-interfaces-oper:interfaces
192.168.1.56/restconf/data/Cisco-IOS-XE-interfaces-oper:interfaces/interface=GigabitEthernet1
192.168.1.56/restconf/data/Cisco-IOS-XE-interfaces-oper:interfaces/interface=Loopback0
POST:
192.168.1.56/restconf/data/ietf-interfaces:interfaces
Body:
{
"ietf-interfaces:interface": {
"name": "Loopback99",
"type": "iana-if-type:softwareLoopback",
"enabled": true,
"ietf-ip:ipv4": {
"address": [
{
"ip": "99.99.99.99",
"netmask": "255.255.255.255"
}
]
}
}
}
Enjoy, Like, and Subscribe. 😃
Free RU-vid Playlists from Keith:
▶ Master Playlist for Cisco CCNA 200-301 ogit.online/sloth
🔐 Cisco CCNA 200-301 Security ogit.online/20...
💻 Cisco CCNA 200-301 IPv4 Subnetting ogit.online/su...
💬 Join our Discord server (free) ogit.online/Jo...
🏪 Keith Barker Amazon Affiliate Store www.amazon.com...
And…
🏫 Keith’s Content at CBT Nuggets ogit.online/Ke...
#KeithBarker #CCNA #200-301
6 окт 2024