1Question 1
Security Operations
Choose 1
Which of the following API actions are not valid?
Correct answer:
C. UPDATE
Explanation:
REST APIs use standard HTTP methods that map to CRUD operations. VMware vDefend (NSX) REST API supports the conventional HTTP verbs: GET, POST, PUT, PATCH, and DELETE. "UPDATE" is not a standard HTTP method; it is a conceptual operation implemented using PUT (full update) or PATCH (partial update). Therefore, "UPDATE" is not a valid API action.
Correct Option:
C. UPDATE –
Correct. "UPDATE" is not a valid HTTP method in REST API design. The corresponding actions are implemented using PUT (replace entire resource) or PATCH (modify specific fields). NSX API does not recognize "UPDATE" as an API call action; this option correctly identifies the invalid action.
Incorrect Options (these ARE valid):
A. GET –
Valid. GET retrieves resources or collections from NSX Manager. It is idempotent and safe (no state change). Example: GET /api/v1/firewall/rules.
B. POST –
Valid. POST creates new resources (server-assigned ID) or invokes actions. Example: POST /api/v1/firewall/rules creates a new firewall rule.
D. DELETE –
Valid. DELETE removes existing resources. Example: DELETE /api/v1/firewall/rules/.
Reference:
VMware NSX API Guide: "Supported HTTP Methods" – lists GET, POST, PUT, PATCH, DELETE. "UPDATE" is not an HTTP method. Also covered in REST API Best Practices and VMware vDefend Automation Guide, section on API method reference.
REST APIs use standard HTTP methods that map to CRUD operations. VMware vDefend (NSX) REST API supports the conventional HTTP verbs: GET, POST, PUT, PATCH, and DELETE. "UPDATE" is not a standard HTTP method; it is a conceptual operation implemented using PUT (full update) or PATCH (partial update). Therefore, "UPDATE" is not a valid API action.
Correct Option:
C. UPDATE –
Correct. "UPDATE" is not a valid HTTP method in REST API design. The corresponding actions are implemented using PUT (replace entire resource) or PATCH (modify specific fields). NSX API does not recognize "UPDATE" as an API call action; this option correctly identifies the invalid action.
Incorrect Options (these ARE valid):
A. GET –
Valid. GET retrieves resources or collections from NSX Manager. It is idempotent and safe (no state change). Example: GET /api/v1/firewall/rules.
B. POST –
Valid. POST creates new resources (server-assigned ID) or invokes actions. Example: POST /api/v1/firewall/rules creates a new firewall rule.
D. DELETE –
Valid. DELETE removes existing resources. Example: DELETE /api/v1/firewall/rules/
Reference:
VMware NSX API Guide: "Supported HTTP Methods" – lists GET, POST, PUT, PATCH, DELETE. "UPDATE" is not an HTTP method. Also covered in REST API Best Practices and VMware vDefend Automation Guide, section on API method reference.