VMware vRealize Automation 8.x (2022) — Question 68
According to REST principles, which is the recommended way to update the order resource identified by 1234?
Answer options
- A. Send a PUT request to /orders/edit?id=1234.
- B. Send a PUT request to /orders/1234.
- C. Send a POST request to /orders/1234.
- D. Send a POST request to /orders/edit?id=1234.
Correct answer: B
Explanation
The correct method to update a resource in REST is to use a PUT request directed at the specific resource's URL, which in this case is /orders/1234. Options A and D use the incorrect HTTP method for updating, as they employ POST instead of PUT, and both also include unnecessary query parameters. Option C uses POST instead of the proper PUT method for updating an existing resource.