300-435 Question 65
Single answerYou are an engineer automating the configuration of multiple Cisco network devices in your enterprise using RESTCONF. During implementation, you need to retrieve the current interface status of a specific device in JSON format. What HTTP method and resource path should you use to achieve this?
- A
GET /restconf/data/Cisco-IOS-XE-interfaces-oper:interfaces/interface
- B
POST /restconf/data/Cisco-IOS-XE-interfaces-oper:interfaces/interface
- C
PATCH /restconf/data/Cisco-IOS-XE-interfaces-oper:interfaces/interface
- D
DELETE /restconf/data/Cisco-IOS-XE-interfaces-oper:interfaces/interface
Show answer and explanation
Correct answer: A
Explanation
In RESTCONF, the GET method is used to retrieve data from a network device. The resource path /restconf/data/Cisco-IOS-XE-interfaces-oper:interfaces/interface corresponds to the operational model for interface status in Cisco devices. By using GET with this path, you can retrieve the current state of the interfaces in JSON format. Other HTTP methods like POST, PATCH, and DELETE are used for different operations such as creating, modifying, or deleting resources, making them unsuitable for this scenario.
- A. Correct.
GET is the correct HTTP method to retrieve data from a resource. The resource path provided aligns with the operational data model for interface status on Cisco devices.
- B. Incorrect.
POST is used to create or modify resources, not to retrieve data. This is not the correct choice for querying interface status.
- C. Incorrect.
PATCH is used to partially modify existing resources. It is not applicable for retrieving data.
- D. Incorrect.
DELETE is used to remove resources, which is unrelated to retrieving interface status information.