A team manages IOS XE devices over RESTCONF with JSON payloads. An engineer must change the description on interface GigabitEthernet1/0/1 while leaving every other configured leaf on that interface exactly as it is. Which RESTCONF method and URL should carry that single YANG data update?
Select an answer to reveal the explanation.
Short Explanation
Use PATCH with a JSON body containing only the description, so you change just that leaf—like updating one field on a form without erasing the rest. Include the interface’s list key in the URL and encode the slash as %2F so RESTCONF targets the right entry.
Full Explanation
RESTCONF maps YANG data onto HTTP resources, and the method determines how data not included in the request is handled. PATCH applies a partial update to the targeted resource, so the keyed interface path and a body containing the description update that leaf while leaving other interface data unchanged. The slash in the key is percent-encoded as RFC 8040 requires. PUT replaces the target resource rather than making this partial update, so a one-leaf body does not preserve the other interface data. POST creates a resource beneath the target, rather than updating the existing interface entry. The key-less URL does not identify the specific interface instance required for this update. Module names and wrapper elements can differ by device and YANG revision, so confirm the data tree with a GET first. After PATCH, GET the interface again to verify the description changed and the other data remains unchanged.