RESTCONF: Green Runs, No Change
Every run is green and the device never changed. Read the response and then read the device back, live, right below.
Symptom
A Python script pushes config over RESTCONF and reports success every run, yet the device never actually changes.
Your mission
Inspect, recover, then verify
Format
Linux shell
Investigate before you configure.
Use the CLI evidence to isolate the fault, make the smallest safe correction, then verify the network state changed.
Observe the symptom and link state.
Diagnose by comparing the protocol evidence.
Verify the expected device state and confirm the original symptom is resolved.
Console access: Linux
This workspace stacks for portrait phones. Rotate to landscape for the full split-screen console.
Need a hint?
Reveal the root cause when you're ready.
Try the investigation first, then use this as your escape hatch, not a dead end.
Lab debrief
Turn the session into a repeatable troubleshooting pattern.
Use this reference after your attempt: first explain the symptom, then verify the evidence, then confirm the repair.
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.
Commands to run yourself
The real diagnostic commands for this lab, copy-paste ready. Run these in the same order to reproduce the investigation on your own session.
curl -sv -k -u admin:admin -X PATCH https://10.20.30.5/restconf/data/Cisco-IOS-XE-native:native/interface -H 'Content-Type: application/json' -d @payload.jsoncurl -s -k -u admin:admin https://10.20.30.5/restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=2 -H 'Accept: application/yang-data+json' | jq .cat payload.jsonTopology diagram
Fact-checked references
The commands and behaviour in this lab were checked against these primary references.
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.