Automation · RESTCONF
JSON
Cheat sheet · https://pcornel.dk/topic.php?topic=5625
Answer
RESTCONF JSON encoding uses media type application/yang-data+json, with keys prefixed by the YANG module name, such as "ietf-interfaces:interface".
Remember
- application/yang-data+json.
- Keys are prefixed with module name.
- Content-Type needed on writes.
First checks
curl ... -H 'Accept: application/yang-data+json' | jq .— JSON response- Module-qualified names ("ietf-interfaces:interface") — format
- Numbers/strings per YANG type — types
Verify in this order
YANG → RFC 7951 JSON
Where it usually breaks
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5625