An administrator needs to modify only the target syslog server address on a network device via a RESTCONF API. The existing target resource container contains configuration attributes for syslog logging levels, facility settings, and buffer sizes. To update the server address without deleting or overwriting the unreferenced logging attributes within that resource container, which HTTP verb and header combination must be transmitted?
- HTTP PATCH verb with Content-Type: application/yang-data+jsonAnswer
- BHTTP PUT verb with Content-Type: application/yang-data+json
- CHTTP POST verb with Content-Type: application/yang-data+json
- DHTTP GET verb with Content-Type: application/yang-data+json
Answer
HTTP PATCH verb with Content-Type: application/yang-data+json
The HTTP PATCH verb is designed for partial resource modification. When modifying a sub-element (such as a syslog server IP) inside an existing resource container, PATCH applies changes only to the keys included in the request payload while preserving unreferenced parameters such as facility settings and buffer sizes.
Step-by-Step Solution
Key Concept
REST HTTP Verbs vs CRUD Operations (PUT vs PATCH differences)
Estimated Time:1m 0s