Soru

Zorluk: KolayCharacteristics of REST-Based APIs (CRUD, HTTP Verbs, Data Formats)

A network administrator needs to retrieve the operational state and configuration details of a specific router interface using a REST API without making any modifications to the device. Which HTTP verb should be used in the API request?

  1. GETCevap
  2. B
    POST
  3. C
    PUT
  4. D
    DELETE

Cevap

The GET method is used to retrieve data from a REST API endpoint without altering device state.
In REST-based API architectures, the HTTP GET method maps directly to the Read operation of CRUD. It is a safe and idempotent request used strictly to fetch resource representations without modifying server state.

Adım Adım Çözüm

1
Determine the desired CRUD operation.
Fetching configuration details without making any changes corresponds to the Read operation.
The requirement explicitly states that data must be retrieved with zero modification to the device state.
2
Map the CRUD operation to the appropriate RESTful HTTP verb.
The Read operation maps to the GET HTTP method.
In REST architecture, GET is a safe, read-only verb designated specifically for data retrieval.

Anahtar Kavram

HTTP Verb to CRUD Mapping in REST APIs
Bu soruyu puanla