A developer must change only the description of GigabitEthernet1/0/1 through RESTCONF on a switch with hundreds of interfaces, and every other leaf in that interface entry has to stay exactly as it is. The entry already exists in the running datastore. Which RESTCONF method and URL structure should the script use?
Select an answer to reveal the explanation.
Short Explanation
You can target the existing interface entry and change just the description without disturbing its other leaves. PATCH merges the value you send into that entry, like updating one line on a form while leaving the rest untouched.
Full Explanation
RESTCONF exposes YANG data as resources, and the URL identifies the resource acted on. Since the interface entry already exists and every other leaf in it must remain unchanged, PATCH to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1%2F0%2F1 is appropriate: it merges the supplied description into that entry without replacing sibling leaves. The list-instance path uses an equals sign before the key, and the slash in the interface name is percent-encoded. PUT to /restconf/data/ietf-interfaces:interfaces targets the entire interfaces container, so replacing that resource can put every other interface entry at risk. POST to the keyed interface URI is for creating a child resource, not updating the existing interface entry. PATCH to /restconf/data/interfaces/interface=GigabitEthernet1%2F0%2F1 uses a path without the ietf-interfaces module prefix, so it does not identify the same ietf-interfaces resource. Exam caveat: pay attention to the scope of the URI; a container path and a keyed list-instance path refer to different replacement or update targets. Practical check: GET the entry before and after PATCH, then compare its neighbouring leaves to verify they stayed unchanged.