Courseiva
mediumMultiple Choice

200-901 Practice Question: A network automation script uses the Cisco DNAC…

A network automation script uses the Cisco DNAC Python SDK (dnacentersdk) to retrieve devices. Which method correctly lists all devices?

⚠ Common exam trap

Cisco often tests the exact method naming conventions in the SDK, and the trap here is that candidates confuse the generic Python list concept (e.g., `list_devices()`) with the SDK's actual method name (`get_device_list()`), or they assume a top-level method exists without the resource hierarchy.

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

✓

dnac.devices.get_device_list()

The Cisco DNAC Python SDK (dnacentersdk) uses a hierarchical method structure where the `devices` resource is accessed via `dnac.devices`, and the `get_device_list()` method is the exact SDK call to retrieve all devices from the Cisco DNA Center. This matches the official SDK documentation and the REST API endpoint `/dna/intent/api/v1/network-device`.

Answer analysis

Option-by-option breakdown

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

  • ✗

    dnac.get_devices()

    Why it's wrong here

    get_devices is not a method on the dnacentersdk object; device retrieval lives under the devices namespace, so this call fails. It is tempting because it reads like a direct REST GET, which suits raw requests-based scripts rather than the SDK's namespaced API.

  • ✓

    dnac.devices.get_device_list()

    Why this is correct

    get_device_list() is the dnacentersdk method that queries the DNA Center devices endpoint and returns all discovered devices. It satisfies the script's requirement to list every device, unlike methods that fetch a single device by ID or return unrelated inventory objects.

  • ✗

    dnac.sites.get_site_devices()

    Why it's wrong here

    get_site_devices returns devices assigned to a specific site, requiring a site identifier, so it cannot enumerate all devices. It is the correct call when scoping inventory to one site, not for a full device listing.

  • ✗

    dnac.devices.list_devices()

    Why it's wrong here

    The dnacentersdk exposes device retrieval through the devices namespace as get_device_list, so list_devices does not exist and raises an attribute error. It is tempting because list-style naming mirrors many REST SDKs, but those SDKs wrap different endpoints.

About these practice questions

One of 975 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 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 200-901 exam.