350-501 · Question #285
When Cisco lOS XE REST API uses HTTP request methods what is the purpose of a PUT request?
The correct answer is C. updates the specified resource with new information. When Cisco IOS XE REST API uses HTTP request methods, a PUT request is specifically intended for updating an existing resource with new information.
Question
When Cisco lOS XE REST API uses HTTP request methods what is the purpose of a PUT request?
Options
- Aretrieves the specified resource or representation
- Bsubmits data to be processed to the specified resource
- Cupdates the specified resource with new information
- Dcreates a new resource
How the community answered
(34 responses)- A3% (1)
- B3% (1)
- C88% (30)
- D6% (2)
Why each option
When Cisco IOS XE REST API uses HTTP request methods, a PUT request is specifically intended for updating an existing resource with new information.
GET is the standard HTTP method for retrieving the specified resource or its representation.
POST is generally used to submit data to be processed to a specified resource, often resulting in the creation of a new resource or initiating an action.
The HTTP PUT method is typically used to update all current representations of a target resource with the provided uploaded content. This makes it the appropriate method for replacing or modifying an existing resource with new information, and it is idempotent.
While PUT can create a resource if the URI is known and the resource does not exist, its primary and most common role when dealing with existing resources is for updating.
Concept tested: REST API HTTP PUT method purpose
Source: https://developer.cisco.com/docs/ios-xe/#!restconf/restconf-basic-operations
Topics
Community Discussion
No community discussion yet for this question.