Question

Difficulty: EasyCharacteristics of REST-Based APIs (CRUD, HTTP Verbs, Data Formats)

A network administrator is developing an automation script to interact with a Cisco DNA Center REST API. The script needs to completely replace an existing network device interface configuration resource with a newly provided configuration payload. Which HTTP verb must the administrator use to perform this complete replacement operation?

  1. HTTP PUTAnswer
  2. B
    HTTP POST
  3. C
    HTTP GET
  4. D
    HTTP PATCH

Answer

HTTP PUT is the correct HTTP verb used to replace an existing REST API resource entirely with a new representation payload.
In REST-based network management APIs, HTTP PUT maps to the Update action in CRUD specifically for overwriting or completely replacing an existing target resource with the provided payload.

Step-by-Step Solution

1
Identify the required CRUD operation
The operation requires replacing an existing interface configuration resource completely.
HTTP verbs map directly to specific CRUD (Create, Read, Update, Delete) functions in RESTful architectures.
2
Map full resource replacement to the corresponding HTTP verb
HTTP PUT is defined to replace the target resource entirely with the request payload.
Unlike HTTP PATCH (partial modification) or HTTP POST (creating a new resource), HTTP PUT overwrites the existing resource at the specified URL.

Key Concept

RESTful API HTTP Verb to CRUD Mapping (PUT vs POST/PATCH)
Rate this question