10 Cisco DevNet Associate Questions Most Candidates Get Wrong
Welcome to this set of practice questions designed to mirror the difficulty and breadth of the Cisco DevNet Associate (200-901 DEVASC) exam. These questions cover key domains including Python scripting, REST APIs, Cisco platforms (like DNA Center and Meraki), software development practices (Git/CI-CD), and network fundamentals. Each question includes a detailed explanation to reinforce the underlying concepts, ensuring you learn not just the correct answer, but also why the distractors are incorrect.
Question 1
An engineer is writing a Python script to interact with a REST API. The API requires authentication via an API key, which must be sent in the HTTP header. Which Python dictionary structure is correct for passing this key using the requests library? For practical tips on this, see Cisco DevNet Associate Difficulty: What Actually Makes People Fail.
A. requests.get(url, auth=("X-Api-Key", api_key))
B. requests.get(url, headers={"X-Api-Key": api_key})
C. requests.get(url, params={"X-Api-Key": api_key})
D. requests.get(url, json={"X-Api-Key": api_key})
Answer: B
Explanation: Custom headers are passed using the headers parameter, which accepts a dictionary where the key is the header name and the value is the header value. The auth parameter is for basic authentication (username/password), params adds query string parameters to the URL, and json is for sending JSON data in the request body.
Question 2
In a Git repository, a developer wants to permanently discard uncommitted local changes to a file named config.yaml and restore it to the state of the last commit. Which command accomplishes this?
A. git clean -f config.yaml
B. git restore config.yaml
C. git checkout HEAD~1 config.yaml
D. git rm --cached config.yaml
Answer: B
Explanation: git restore (introduced in Git 2.23) resets the working tree file to match the index or HEAD, discarding local modifications. git clean removes untracked files, not modifications. git checkout HEAD~1 would restore the file from the previous commit, not the last commit. git rm --cached removes the file from the index but keeps it in the working directory.
Question 3
A Python script uses the Cisco DNA Center REST API to retrieve a list of network devices. The script gets a 202 Accepted HTTP response to a POST request. What does this status code specifically indicate in the context of DNA Center?
A. The request was malformed and rejected.
B. The request was successfully completed synchronously.
C. The request has been accepted for processing, but the result is not ready yet.
D. The user lacks the necessary RBAC permissions to perform the task.
Answer: C
Explanation: DNA Center often uses asynchronous task-based workflows for long-running operations. A 202 Accepted means the API accepted the request and queued the task; the client must poll a separate task ID endpoint to check status. A 400 series error indicates malformed requests, and 403 indicates permission issues. A 200 OK would be a synchronous completion.
Question 4
Which Python code snippet correctly uses the json module to load a JSON response from a text variable response_text into a Python dictionary?
A. data = json.loads(response_text)
B. data = json.load(response_text) For more on this topic, see our guide on How to Finish Cisco DevNet Associate Before the Timer Runs Out.
C. data = json.dumps(response_text)
D. data = json.dump(response_text)
Answer: A
Explanation: json.loads() parses a JSON string (like from response.text) into a Python object. json.load() reads from a file object, not a string. json.dumps() converts a Python object to a JSON string (serialization), and json.dump() writes to a file.
Question 5
A developer is configuring a CI/CD pipeline for a Python application. Which stage is most appropriate for running unit tests?
A. Build
B. Test
C. Deploy
D. Release
Answer: B
Explanation: In standard CI/CD pipelines, the "Test" stage is designated for running automated tests (unit, integration, etc.) to validate code before deployment. The "Build" stage compiles packages, "Deploy" pushes to environments, and "Release" finalizes versioning and distribution.
Question 6
When using the Meraki Dashboard API, a network admin wants to retrieve a list of all organizations accessible to the API key. Which HTTP method and endpoint path is correct?
A. GET /organizations
B. POST /organizations
C. GET /networks
D. PUT /organizations
Answer: A
Explanation: The Meraki API uses GET /organizations to list all organizations associated with the API key. POST is for creating resources, GET /networks lists networks within a specific organization (requires an organizationId), and PUT is for updating existing resources.
Question 7
In a Python script using Netmiko to automate a Cisco IOS device, which method is used to send a command and read the output back?
A. send_command()
B. send_config_set()
C. get_command()
D. run_command()
Answer: A Want to go further? You Passed Cisco DevNet Professional. What Is the Next Certification Worth Doing? is a good next step.
Explanation: send_command() is the Netmiko method used for executing show/exec commands and returning the output. send_config_set() is specifically for sending configuration commands in config mode. The other two options are not valid Netmiko methods.
Question 8
Which data format is natively supported by YANG (Yet Another Next Generation) for modeling network configuration and state data?
A. XML
B. CSV
C. HTML
D. YAML
Answer: A
Explanation: YANG is a data modeling language used to define data structures for NETCONF/YANG protocols. While YANG can be serialized in JSON or XML, its native and original encoding is XML (used with NETCONF). YAML is often used for configuration files but is not the native YANG encoding.
Question 9
An engineer wants to use a Python script to automate backup of running configurations from multiple Cisco IOS devices via SSH. Which library is specifically designed for this purpose and handles the interactive SSH session?
A. paramiko
B. requests
C. flask
D. pytest
Answer: A
Explanation: paramiko is an SSH library that provides low-level control over SSH connections and is the foundation for tools like Netmiko. requests is for HTTP, flask is for web servers, and pytest is for testing.
Question 10
In a REST API response, the ETag header is used for which purpose?
A. Encoding the response body using Base64.
B. Specifying the authentication token.
C. Providing a version identifier for caching and conditional requests.
D. Indicating the maximum time the response can be cached.
Answer: C
Explanation: An ETag (Entity Tag) is an opaque identifier assigned by a web server to a specific version of a resource. Clients can use it in If-Match or If-None-Match headers for conditional requests, improving cache efficiency and preventing lost updates. It is not related to encoding, tokens, or cache duration (which is Cache-Control).
These questions represent the core logic and tooling you must master for the DevNet Associate exam. Remember that the actual test emphasizes scenario-based thinking, so practice writing small scripts and interacting with sandbox APIs. Focus on the "why" behind each answer to build a strong foundation for network automation.
To turn that practice into a plan, you can use our free study plans and readiness checks to get a schedule that fits your time and a quick check of weak topics.
Every question in Cisco DevNet Associate (DEVASC) mock exam comes with an explanation, so you learn even when you get it wrong.
