Courseiva
Automation →easyMultiple Choice

CCNP Automation Practice Question

A network automation engineer is using the Python 'ncclient' library to manage a Cisco IOS XE device via NETCONF. The engineer wants to retrieve the running configuration. Which NETCONF operation should be used to accomplish this?

⚠ Common exam trap

Watch out — candidates often confuse <get> with <get-config>; <get> retrieves both configuration and state data, but <get-config> is specifically for configuration.

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-config> with a source of <running/>

NETCONF provides specific operations for different tasks. To retrieve configuration data, the <get-config> operation is used with a source datastore, such as <running/>. This returns the configuration without state data. Other operations like <get> retrieve both config and state, while <edit-config> and <copy-config> are for writing or copying. The correct choice is <get-config>.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    <get-config> with a source of <running/>

    Why this is correct

    The <get-config> operation is designed to retrieve configuration data from a specified datastore, such as <running/>. It returns the configuration in XML format. This is the correct NETCONF operation for reading configuration, as it does not include state data. The engineer can then parse the XML to extract the running configuration.

  • ✗

    <get> with a filter for <config>

    Why it's wrong here

    <get> retrieves both configuration and state data, but it does not allow specifying a datastore. It returns the entire state and config, which is more than needed. While it could work, it is not the most precise operation for retrieving only the running configuration. The <get-config> operation is specifically for configuration data and is more efficient.

  • ✗

    <edit-config> with a target of <running/>

    Why it's wrong here

    <edit-config> is used to modify configuration data in a datastore. It is a write operation, not a read operation. Using it to retrieve configuration would not work; it would attempt to apply changes. The engineer needs to read the configuration, so this operation is inappropriate and could cause unintended changes if misused.

  • ✗

    <copy-config> from <running/> to <startup/>

    Why it's wrong here

    <copy-config> is used to copy configuration between datastores, not to retrieve it for display. It would overwrite the startup configuration with the running configuration, which is not the goal. This operation modifies data rather than reading it. The engineer wants to read the configuration, so this is incorrect and potentially harmful.

About these practice questions

Courseiva writes every 350-401 question from scratch — 1,923 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 →

How Courseiva writes practice questions · Editorial policy

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.