Courseiva
Automation →easyMultiple Choice

350-401 Automation Practice Question

A network engineer is writing a Python script using the ncclient library to retrieve the running configuration from a Cisco IOS XE device via NETCONF. The script uses the <get-config> RPC with the source datastore set to 'running'. After running the script, the engineer receives a large XML response but needs to extract only the interface configuration. Which NETCONF capability allows the engineer to filter the response to include only specific configuration data?

⚠ Common exam trap

Many exam-takers confuse capabilities that affect data representation (like with-defaults) with those that filter data (like filter).

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 <filter> element within the <get-config> RPC, specifying a subtree filter or XPath filter.

NETCONF provides a <filter> element within <get-config> and <get> RPCs to restrict the response to specific data. The filter can be a subtree filter or an XPath filter. This allows the engineer to retrieve only the interface configuration, reducing the payload and processing time. The other capabilities mentioned do not serve this purpose.

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 'rollback-on-error' capability, which reverts changes if an error occurs and returns only the changed data.

    Why it's wrong here

    The 'rollback-on-error' capability is used in <edit-config> to automatically roll back if an error occurs during configuration. It does not apply to <get-config> and does not filter data. It is unrelated to retrieving specific configuration sections. Therefore, it is not the correct answer.

  • ✗

    The 'candidate' datastore, which contains only the differences from the running configuration.

    Why it's wrong here

    The candidate datastore holds a candidate configuration that can be modified and committed. It does not inherently contain only differences from running; it is a separate datastore that may be empty or contain a full configuration. Using the candidate datastore would not filter the response to interface configuration; it would simply query a different datastore. This is not a filtering mechanism.

  • ✗

    The 'with-defaults' capability, which allows the server to return only non-default configuration.

    Why it's wrong here

    The 'with-defaults' capability controls how default data is reported (e.g., report-all, trim, explicit). It does not filter based on specific configuration sections like interfaces. While it can reduce the amount of data by trimming defaults, it does not allow targeting a specific subtree. Therefore, it is not the correct mechanism for extracting only interface configuration.

  • ✓

    The <filter> element within the <get-config> RPC, specifying a subtree filter or XPath filter.

    Why this is correct

    NETCONF supports filtering of <get-config> and <get> responses using the <filter> element. The filter can be a subtree filter (matching XML structure) or an XPath filter (using XPath expressions). By specifying a filter, the engineer can limit the response to only the desired configuration, such as interfaces. This is a standard NETCONF capability and is essential for efficient data retrieval.

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.