easyMultiple ChoiceObjective-mapped
350-401 Practice Question: Is using the Cisco DNA Center REST API to…
A network engineer is using the Cisco DNA Center REST API to retrieve the health score of a specific device. The API response is as follows:
{
"response": [
{
"deviceId": "1234567890",
"hostname": "Core-Switch-1",
"score": 8,
"overallHealth": "good",
"timestamp": 1623456789
}
],
"version": "1.0"
}The engineer wants to extract the 'overallHealth' value. Which Python code correctly extracts it?
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
✓
health = response['response'][0]['overallHealth']
The response is a dictionary with a key 'response' that contains a list. The list has one dictionary. To access 'overallHealth', you need to index the list and then the key.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
health = response['response'][0]['overallHealth']
Why this is correct
Correct. This accesses the first element of the list inside 'response' and then retrieves 'overallHealth'.
- ✗
health = response['overallHealth']
Why it's wrong here
This would fail because 'overallHealth' is not a top-level key.
- ✗
health = response['response']['overallHealth']
Why it's wrong here
This would fail because 'response' contains a list, not a dictionary.
- ✗
health = response[0]['overallHealth']
Why it's wrong here
This would fail because the top-level object is a dictionary, not a list.
Go deeper
Related to this question
Learn chapter
Network Architecture Fundamentals
Key term
Cisco DNA Center
A centralized network management and automation platform from Cisco that provides intent-based networking for easier configuration, monitoring, and troubleshooting of Cisco devices.
Key term
REST API for Network Devices
A REST API for network devices is a set of rules that allows software applications to communicate with routers, switches, and firewalls using standard web methods like GET, POST, PUT, and DELETE over HTTP or HTTPS.
About these practice questions
This 350-401 question is part of Courseiva's 1,175-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.