Automation · RESTCONF
PATCH
Cheat sheet · https://pcornel.dk/topic.php?topic=5623
Answer
RESTCONF PATCH merges the supplied data into the existing resource, changing only the given fields, which is the usual safe way to update configuration.
Remember
- PATCH merges supplied fields.
- Safest way to change.
- Returns 204 on success.
First checks
curl -s --cacert ca.pem -u <u>:<p> -X PATCH -H 'Content-Type: application/yang-data+json' -d @partial.json https://<dev>/restconf/data/<path>— merge- YANG Patch (application/yang-patch+json) for complex edits — RFC 8072
- Verify merged result — GET
Verify in this order
PATCH partial → merged
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=5623