6. Appendix A: RESTCONF URI Demystified (IOS XE)

The RESTCONF protocol uses secure HTTP methods to provide CREATE, READ, UPDATE, and DELETE (CRUD) operations on a device’s YANG-modelled data store. For those operations, HTTP URI acts as a location identifier within the hierarchical data tree. The following example shows how to read the complete configuration for the SVI Vlan10 interface using Cisco’s “native” model:

$ curl -k -u admin:cisco -H 'Accept: application/yang-data+json' \
https://192.168.2.4/restconf/data/Cisco-IOS-XE-native:native/interface/Vlan=10 { "Cisco-IOS-XE-native:Vlan": { "name": 10, "description": "DevNet Vlan SVI interface", "ip": { "address": { "primary": { "address": "10.10.0.1", "mask": "255.255.255.0" ...

Get Cisco DEVCOR 350-901 Study Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.