DevNet Associate (DEVASC) v1.0Infrastructure and AutomationEasy
A network developer is integrating a custom application with a Cisco IOS XE device to retrieve specific configuration data using the RESTCONF protocol. The application needs to fetch the running configuration of a particular interface. Which HTTP method should the developer use for this operation?
- APOST
- BPUT
- CGET
- DDELETE
Show answer & explanationAnswer & explanation
Correct answer: C. GET
In RESTCONF, the HTTP GET method is used to retrieve data from the device. To fetch the running configuration of a specific interface, a GET request would be sent to the corresponding URI.
Why the other options are wrong
- A. POST is typically used to create new resources (e.g., a new interface configuration).
- B. PUT is used to completely replace an existing resource or create a new one if it doesn't exist.
- D. DELETE is used to remove a resource (e.g., delete an interface configuration).
RESTCONF GET Method
The RESTCONF GET method is used to retrieve configuration data and/or operational state data from a network device. It is a read-only operation and is idempotent.
- Retrieves data (config and state)
- Read-only operation
- Idempotent (multiple requests yield same result)
- Uses HTTP GET verb
- Targeted via URI path
Memory trick: GET the data, PUT it there, POST new, DELETE it gone.