Question

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

A network engineer is implementing automated API calls against a Cisco Catalyst Center controller. Match each HTTP request verb to its corresponding CRUD operation and database handling behavior.

  • HTTP POSTCreates a new resource subordinate to the specified collection URI (CRUD: Create).
  • HTTP PUTReplaces an existing resource in its entirety with the provided payload representation (CRUD: Update/Replace).
  • HTTP PATCHModifies only the specific fields supplied in the payload without resetting unreferenced parameters (CRUD: Update/Modify).
  • HTTP DELETERemoves the designated target resource from the API data store (CRUD: Delete).

Answer

HTTP POST matches creating a new collection resource (CRUD: Create); HTTP PUT matches full resource replacement (CRUD: Update/Replace); HTTP PATCH matches partial attribute updates (CRUD: Update/Modify); HTTP DELETE matches target resource removal (CRUD: Delete).
In REST-based automation, HTTP verbs map directly to specific CRUD operations: POST instantiates new entries, PUT performs a full resource replacement, PATCH updates partial attributes, and DELETE removes resources.

Step-by-Step Solution

1
Map the resource creation and deletion verbs to their primary CRUD definitions.
POST creates new sub-resources under a endpoint collection, while DELETE removes existing resources.
RESTful conventions define POST for creation operations and DELETE for resource removal.
2
Differentiate between full and partial resource update operations.
PUT executes a complete replacement of the entity, whereas PATCH updates only designated fields.
Sending a PUT request replaces the entire target state, while PATCH modifies specific attributes without wiping omitted parameters.

Key Concept

RESTful API HTTP Verbs and CRUD Mapping
Rate this question