Network Assurance

An engineer uses RESTCONF to change only the description of an existing interface. All other leaves of that interface must stay as they are. Which HTTP method should the request use?

Show the answer

Correct answerA. PATCH

AWhy this is right: PATCH merges the supplied data into the existing resource, changing only the description.

BWhy not this: POST creates a new child resource or invokes an operation; it is not used to edit existing leaves.

CWhy not this: PUT replaces the entire target resource, so omitted leaves would be lost or reset.

DWhy not this: GET only retrieves data and makes no configuration change.

PATCH merges the supplied data into the existing resource, so only the description changes. PUT is tempting, but it replaces the whole target resource and would remove any leaves not included in the payload.