Pcornel
Networking · Automation and Artificial Intelligence

RESTCONF (CCNA)

Cheat sheet · https://pcornel.dk/topic.php?topic=96

Back to the Topic

Answer

RESTCONF is an HTTPS API for reading and changing YANG-modelled configuration and state on network devices, using JSON or XML. Protocol details and examples are in Automation → RESTCONF.

Remember

A success response here is not evidence that the API security policy is correct or that the network service works end to end.

First checks

show running-config | include restconf|http secure-server → both enabled. show platform software yang-management process → the RESTCONF processes are running. curl -u user:pass -H "Accept: application/yang-data+json" https://<device>/restconf/data/ietf-interfaces:interfaces → 200 with JSON.

Verify in this order

restconf and ip http secure-server enabled → HTTPS reachable, user with privilege 15 → GET /restconf/data/<module>:<path> with Accept application/yang-data+json → 200 and JSON → PATCH or PUT a change (204) → GET to verify → save the configuration

Where it usually breaks

physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=96

Confirmation

Confirm action

Continue?