A network automation engineer is building Python scripts to interact with Cisco DNA Center and RESTCONF API interfaces. Match each HTTP request configuration on the left to its corresponding RESTful API operational behavior on the right.
- HTTP PUT to a specific resource URI with a Content-Type payloadCompletely replaces the target resource or creates it if non-existent, requiring a complete resource representation (Idempotent).
- HTTP PATCH to a specific resource URI with a Content-Type payloadApplies partial modifications to the target resource, updating only specified fields while leaving unmentioned parameters unchanged.
- HTTP POST to a collection URI with an Accept header specifiedCreates a subordinate resource under the specified parent collection while instructing the server on the expected response payload encoding format.
- HTTP GET to a specific resource URI with an If-None-Match headerRequests resource retrieval conditionally based on ETag validation, receiving HTTP status 304 Not Modified if the payload is unchanged.
Answer
HTTP PUT maps to complete resource replacement (Idempotent); HTTP PATCH maps to partial modification of specified attributes; HTTP POST with an Accept header maps to creating a subordinate resource while specifying expected response encoding; HTTP GET with an If-None-Match header maps to conditional resource retrieval based on ETag validation.
Matching each HTTP request operation to its behavior requires analyzing HTTP verb semantics, idempotency, and header roles in REST APIs. PUT performs complete resource replacement (idempotent), PATCH performs partial attribute modification, POST creates new subordinate resources with Accept defining expected response formatting, and GET with If-None-Match enables conditional retrieval using ETags.
Step-by-Step Solution
Key Concept
Characteristics of REST-Based APIs (CRUD, HTTP Verbs, Data Formats)
Estimated Time:2m 0s