hardMultiple SelectObjective-mapped
350-401 Practice Question: Which three statements about using Python for…
Which three statements about using Python for interacting with Cisco IOS-XE devices via NETCONF and RESTCONF are true? (Choose three.)
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
✓
The ncclient Python library can be used to establish a NETCONF session with a Cisco IOS-XE device and retrieve YANG-modeled data.
The correct answers are A, B, and C. Option A is true because the ncclient library is specifically designed for NETCONF sessions and can retrieve YANG-modeled data from Cisco IOS-XE devices. Option B is true: RESTCONF uses standard HTTP methods (GET, POST, PUT, DELETE) to access YANG-defined data. Option C is true: YANG models define the structure, constraints, and semantics of data accessible via NETCONF or RESTCONF. Option D is false because RESTCONF supports JSON and XML encoding, not YAML. Option E is false: NETCONF uses XML encoding (not binary) and is not always faster than RESTCONF; performance depends on network conditions, payload size, and device implementation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The ncclient Python library can be used to establish a NETCONF session with a Cisco IOS-XE device and retrieve YANG-modeled data.
Why this is correct
Correct because ncclient is a widely used Python library that implements NETCONF client functionality, allowing retrieval and manipulation of YANG-defined data on devices that support NETCONF.
- ✓
RESTCONF uses HTTP methods such as GET, POST, PUT, and DELETE to access YANG-defined data on a network device.
Why this is correct
Correct because RESTCONF is a REST-like protocol that maps CRUD operations to HTTP methods, using YANG as the data modeling language.
- ✓
YANG models define the structure and constraints of data that can be accessed via NETCONF or RESTCONF.
Why this is correct
Correct because YANG (Yet Another Next Generation) is a data modeling language used to describe configuration and state data, and it is the foundation for both NETCONF and RESTCONF.
- ✗
RESTCONF only supports data encoding in YAML format.
Why it's wrong here
Incorrect because RESTCONF supports both XML and JSON encodings (as per RFC 8040), not YAML.
- ✗
NETCONF is always faster than RESTCONF for retrieving large amounts of data because it uses a binary encoding.
Why it's wrong here
NETCONF primarily uses XML for data encoding, which is text-based, not binary, making the claim it "always" uses binary incorrect and thus negating the stated reason for superior speed. While binary encodings like EXI can be utilised with NETCONF to potentially improve performance for large data volumes, this is not its default or universal characteristic. The option is tempting because binary protocols *can* offer efficiency gains over text-based ones in specific high-throughput scenarios, but this is not a general truth for NETCONF versus RESTCONF.
Go deeper
Related to this question
Learn chapter
Network Architecture Fundamentals
Key term
REST API for Network Devices
A REST API for network devices is a set of rules that allows software applications to communicate with routers, switches, and firewalls using standard web methods like GET, POST, PUT, and DELETE over HTTP or HTTPS.
Key term
NETCONF Protocol
NETCONF is a network management protocol that uses a structured data format to configure, retrieve, and modify network devices in a standard, programmatic way.
About these practice questions
Courseiva writes every 350-401 question from scratch — 1,175 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.