CCNP Automation Practice Question
A network engineer is writing a Python script to interact with a Cisco IOS XE device using RESTCONF. The engineer wants to retrieve the current configuration of a specific interface. Which HTTP method and URI should be used?
⚠ Common exam trap
The trap here is mixing up HTTP methods or using the wrong syntax for list keys; RESTCONF requires key=value, not key/value.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
GET https://<device>/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1
To retrieve configuration data via RESTCONF, the GET method must be used with a URI that correctly identifies the resource. The URI must follow the RESTCONF syntax for list keys, which uses key=value. The correct option uses GET and the proper URI format to access the specific interface. The other options use incorrect HTTP methods or malformed URIs, which would not retrieve the desired data.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
PUT https://<device>/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1
Why it's wrong here
PUT is used to replace or update a resource, not to retrieve it. While PUT can be used to modify configuration, it does not return the current configuration. The engineer wants to read the configuration, so GET is required. Using PUT would attempt to change the interface configuration, which is not the goal.
- ✗
POST https://<device>/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1
Why it's wrong here
POST is used to create a new resource, not to retrieve existing data. Using POST on an existing interface URI would likely result in an error or unintended creation attempt. The engineer wants to read the configuration, so GET is the correct method. POST is for creation, so this option is incorrect for retrieval.
- ✓
GET https://<device>/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1
Why this is correct
RESTCONF uses the GET method to retrieve data. The URI path /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1 correctly targets a specific interface using the YANG model ietf-interfaces. This is the standard way to read configuration data via RESTCONF. The other methods and URIs are either incorrect HTTP verbs or malformed paths.
- ✗
GET https://<device>/restconf/data/ietf-interfaces:interfaces/interface/GigabitEthernet1
Why it's wrong here
The URI uses a slash instead of an equals sign to specify the interface name. In RESTCONF, list keys are specified using the format key=value, not key/value. The correct syntax is interface=GigabitEthernet1. This option has a malformed URI that would not resolve to the intended resource, resulting in a 404 error.
About these practice questions
This 350-401 question is part of Courseiva's 1,923-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
This 350-401 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 350-401 exam.