Which of the following API call actions are associated with Update in the CRUD operations? (Select all that apply)
Show answerHide answer
Correct answer: C, D PUTPATCH
Explanation
Explanation:In REST API design, CRUD (Create, Read, Update, Delete) operations map to standard HTTP methods. The "Update" operation can be implemented using different HTTP verbs depending on whether the update is full replacement or partial modification. Understanding this mapping is essential when working with VMware vDefend (NSX) REST API automation and scripting.
Correct Options:
C. PUT –
Correct. PUT is the standard HTTP method for full update/replacement of a resource. In NSX API, PUT is used to completely replace an existing object's configuration with the payload provided. This is a classic Update operation in CRUD terminology.
D. PATCH –
Correct. PATCH is used for partial update of a resource, modifying only specified fields without affecting others. NSX API supports PATCH for incremental updates. Both PUT and PATCH are considered Update operations in CRUD, with PUT being full update and PATCH being partial update.
Incorrect Options:
A. POST –
Incorrect. POST is typically associated with the Create operation in CRUD, not Update. In NSX API, POST is used to create new resources or to invoke actions on existing resources (e.g., start/stop), but not for modifying existing object attributes in an idempotent update manner.
B. GET –
Incorrect. GET corresponds to the Read operation in CRUD. It retrieves resource representations without modifying any state. GET is idempotent and safe, used for querying configuration, monitoring data, and inventory. It has no role in Update operations.
E. DELETE –
Incorrect. DELETE corresponds to the Delete operation in CRUD. It removes a resource from the system. DELETE is neither full nor partial update; it is a separate CRUD action entirely, unrelated to Update operations.
Reference:
VMware NSX API Guide: "CRUD Operations and HTTP Methods" – specifies that PUT and PATCH are used for full and partial updates, respectively. Also covered in REST API Best Practices documentation and VMware vDefend Automation Guide, section on API method mapping to CRUD.