Automation · RESTCONF
GET
Cheat sheet · https://pcornel.dk/topic.php?topic=5620
Answer
RESTCONF GET retrieves configuration and state data at a URI, such as /restconf/data/ietf-interfaces:interfaces, with Accept: application/yang-data+json for JSON output.
Remember
- Accept: application/yang-data+json.
- URIs follow the YANG tree.
- 404 means wrong path or no data.
First checks
curl -s --cacert ca.pem -u <u>:<p> -H 'Accept: application/yang-data+json' https://<dev>/restconf/data/<path>— read- ?content=config|nonconfig — config vs state
- 404 for missing node — handling
Verify in this order
GET path → data
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=5620