RESTCONF: 2xx, But Nothing Changed
Automation that reports success while changing nothing is worse than automation that fails loudly. This lab puts you on a Python host wired to a live IOS-XE device over RESTCONF, so you exercise real YANG payloads and learn to verify applied state instead of trusting a 2xx.
The problem
A Python script PATCHes interface config to an IOS-XE device over RESTCONF and returns 204 every run, but the change never sticks. Nothing errors, yet a follow-up GET shows the old value.
What you'll practice
- Authenticate to IOS-XE RESTCONF and read a resource
- Build a correct YANG-modeled JSON payload and Content-Type
- Use PATCH vs PUT deliberately (merge vs replace)
- Verify applied state with a read-back assertion
- Diagnose a request that returns 2xx but changes nothing
The topology
A Linux automation host with Python and the device SDKs reaches a live IOS-XE device over RESTCONF, so every request runs against real YANG models and returns real device state rather than a mock.
Topology diagram
Frequently asked
Why would a 204 not change anything?
A device can accept a request against an unintended resource or ignore a body sent with the wrong media type, returning 2xx while the leaf you meant to change is never touched. The fix is to verify, not trust.
Is this DEVASC-level?
Yes. RESTCONF, YANG payloads and basic Python against real devices are core DevNet Associate (200-901) skills.
Ready to run this lab yourself?
No setup, no image sourcing. Book a session or ask for a live demo.