Question

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

A network administrator is writing an automation script to interact with a Cisco DNA Center REST API. The script needs to perform a full update of an existing network device configuration object by replacing its attributes on the server. Which HTTP verb should the script use?

  1. PUTAnswer
  2. B
    POST
  3. C
    GET
  4. D
    DELETE

Answer

The HTTP PUT verb is used to perform a full update or replacement of an existing resource.
In REST-based APIs, the HTTP PUT method maps directly to the Update operation in the CRUD model when performing a complete replacement of an existing resource.

Step-by-Step Solution

1
Identify the target CRUD operation requested
The requirement specifies modifying/replacing an existing configuration object on the server.
Mapping the operational goal to CRUD determines the appropriate HTTP verb.
2
Map the Update operation to the corresponding HTTP verb
In RESTful architecture, HTTP PUT performs a full update/replacement of an existing resource.
PUT replaces the resource representation completely at the specified URI.

Key Concept

REST API HTTP Verbs and CRUD Mapping
Estimated Time:45s
Rate this question