RESTCONF
Cheat sheet · https://pcornel.dk/topic.php?topic=5593
Answer
RESTCONF is an HTTPS-based API for reading and changing network device configuration and state defined by YANG models, using JSON or XML. This Topic covers using it in network automation workflows; protocol details are in Automation → RESTCONF and security in REST API Security.
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
curl -s --cacert dev-ca.pem -u <u>:<p> -H 'Accept: application/yang-data+json' https://<dev>/restconf/data/ietf-interfaces:interfaces— GET- Root resource discovery (/.well-known/host-meta) — base path
- Enabled on device (restconf, ip http secure-server) — prerequisites
Verify in this order
target/HTTPS trust → RESTCONF root/resource → authz/model context → HTTP operation/payload → response/error → resource read-back → device/network acceptance
Local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Where it usually breaks
RESTCONF proves the modeled HTTP resource transaction, not the complete operational network effect.
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
RESTCONF Network Automation proof-boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Intent / scope | Source revision and exact targets are explicit | Stale inventory, hidden selector or wrong variables change scope |
| Management operation | Transport/model/payload and per-device response are traceable | Auth/capability/parser differences hide partial or wrong execution |
| Device state | Effective and persistent state are read back | Accepted config/API result is mistaken for convergence |
| Network proof | Original control/data-plane or service test passes | Automation summary substitutes for actual network acceptance |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5593