Courseiva
Automation →mediumMultiple Choice

CCNP Automation Practice Question

A financial services firm wants to automate configuration backups of 200 Cisco IOS XE switches. The team prefers an imperative, script-driven approach where Python code calls a structured API and stores the retrieved configuration in a version-controlled repository. Which method best aligns with this goal?

⚠ Common exam trap

The trap here is equating any configuration backup method with an API-driven one, when TFTP and SNMP cannot return structured configuration data.

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

✓

Write a Python script using the requests library to issue RESTCONF GET requests against each switch and save the JSON responses to files.

RESTCONF GET requests return model-driven, structured data over HTTPS, and Python's requests library can issue them programmatically from a central control host. Saving the structured responses to a repository supports version control and diffing. Guest shell Bash scripting, SNMP, and TFTP all either rely on CLI output, cannot retrieve full configurations, or lack structured API semantics, so they miss the stated goal.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Write a Python script using the requests library to issue RESTCONF GET requests against each switch and save the JSON responses to files.

    Why this is correct

    RESTCONF GET returns structured JSON or XML over HTTPS, and Python's requests library can call it directly from a script. Saving the responses into a repository gives the team version-controlled, structured backups. This matches the imperative, script-driven preference and avoids CLI parsing, making it the most aligned approach for programmatic configuration retrieval at scale.

  • ✗

    Schedule a TFTP copy of the startup configuration from each switch to a central server using a cron job.

    Why it's wrong here

    Copying the startup configuration via TFTP retrieves a text file, not structured data through an API, and the startup configuration may differ from the running configuration. TFTP is also unencrypted and offers no model-driven validation. While file-based backups are common, this approach does not match the stated preference for Python calling a structured API and storing structured responses.

  • ✗

    Use SNMP set operations to write the running configuration into a management server's MIB database.

    Why it's wrong here

    SNMP cannot retrieve the full running configuration because the configuration is not exposed as MIB objects. SNMP set operations write specific parameters, not entire configurations, and using them for backups is technically infeasible. This option misrepresents SNMP's scope and would not produce the structured configuration backups the team needs.

  • ✗

    Enable the Cisco IOS XE guest shell and run a Bash script that executes 'show running-config' on a schedule.

    Why it's wrong here

    The guest shell runs on the device itself, and the described approach still relies on CLI output rather than a structured API, which conflicts with the team's preference. It also distributes scripts across 200 devices instead of centralizing logic on a control host. While functional, this method is not the structured, API-driven, centrally managed approach the scenario calls for.

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.