Automation · RESTCONF
PUT
Cheat sheet · https://pcornel.dk/topic.php?topic=5622
Answer
RESTCONF PUT creates or fully replaces the target resource with the supplied data, so anything not included is removed. Use it carefully.
Remember
- PUT replaces the whole resource.
- Missing fields are removed.
- Use with care.
First checks
curl -s --cacert ca.pem -u <u>:<p> -X PUT -H 'Content-Type: application/yang-data+json' -d @full.json https://<dev>/restconf/data/<path>— replace- Full desired subtree in payload — semantics
- Idempotent — safe retry
Verify in this order
PUT path + full subtree → replaced
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=5622