An engineer must change only the description leaf of an existing Loopback0 interface on an IOS XE router through RESTCONF. The YANG module, list key and datastore path are known, and the entry already holds other configured leaves. Which request makes that single change correctly?
Select an answer to reveal the explanation.
Short Explanation
Send PATCH to the existing Loopback0 entry with a JSON body containing just the new description leaf and the YANG data content type. It’s like updating one label without disturbing the other settings; PUT replaces the whole entry, while POST creates a resource.
Full Explanation
RESTCONF maps YANG data onto HTTP resources, so the URL mirrors the data tree: the /restconf/data prefix selects the datastore, ietf-interfaces:interfaces names the module-qualified list, and =Loopback0 selects the entry by its key. PATCH merges the nodes you send into what is already stored, so a body containing the interface entry with only its description leaf changes that leaf while preserving the other leaves. POST is for creating a resource, so posting to an existing list entry does not make this edit; PUT replaces the entire target resource, so a body carrying just the name, type and description would omit and replace the other configured leaves. Patching the interfaces container with every interface entry targets a much broader resource than necessary. Practical check: issue a GET on the interface entry after the patch and confirm neighbouring leaves still hold their old values.