Soru

Zorluk: KolayCharacteristics 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. PUTCevap
  2. B
    POST
  3. C
    GET
  4. D
    DELETE

Cevap

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.

Adım Adım Çözüm

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.

Anahtar Kavram

REST API HTTP Verbs and CRUD Mapping
Tahmini Süre:45s
Bu soruyu puanla