Question

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

When interacting with RESTful network APIs, network engineers use specific HTTP request verbs to execute CRUD (Create, Read, Update, Delete) operations against management endpoints. Match each HTTP request verb on the left to its corresponding operational behavior on the right.

  • HTTP POSTExecutes a Create operation by submitting data to spawn a new resource subordinate to the target URI.
  • HTTP GETExecutes a Read operation by retrieving a representation of a resource without altering server state.
  • HTTP PUTExecutes an Update operation by completely replacing the target resource with the request payload.
  • HTTP PATCHExecutes an Update operation by applying partial modifications to an existing resource.
  • HTTP DELETEExecutes a Delete operation by removing the designated resource from the target server.

Answer

HTTP POST matches creating a new subordinate resource; HTTP GET matches retrieving data safely; HTTP PUT matches full resource replacement; HTTP PATCH matches partial field modification; HTTP DELETE matches resource removal.
Each HTTP verb corresponds directly to a standard CRUD action in RESTful architectures. POST creates new entries, GET reads existing data, PUT overwrites/replaces entire resources, PATCH updates specific fields partially, and DELETE erases targeted resources.

Step-by-Step Solution

1
Identify the mapping between HTTP POST and CRUD operations.
HTTP POST performs the Create operation by instantiating new data resources under a collection URI.
POST is used for creating new entries when the client does not specify the exact final resource URI.
2
Identify the mapping between HTTP GET and CRUD operations.
HTTP GET performs the Read operation by retrieving data without making changes.
GET requests are read-only, safe, and idempotent.
3
Distinguish between HTTP PUT and HTTP PATCH for Update operations.
HTTP PUT performs a full update (replacement), whereas HTTP PATCH performs a partial update.
PUT overwrites the entire target resource with the provided payload, whereas PATCH only modifies specified key-value pairs.
4
Identify the mapping between HTTP DELETE and CRUD operations.
HTTP DELETE performs the Delete operation.
DELETE instructs the API endpoint to erase the target resource.

Key Concept

RESTful API HTTP verbs map directly to basic database CRUD operations (POST=Create, GET=Read, PUT/PATCH=Update, DELETE=Delete).
Rate this question