exam questions

Exam 350-401 All Questions

View all questions & answers for the 350-401 exam

Exam 350-401 topic 1 question 686 discussion

Actual exam question from Cisco's 350-401
Question #: 686
Topic #: 1
[All 350-401 Questions]

Refer to the exhibit.



How should the programmer access the list of VLANs that were received via the API call?

  • A. VlanNames[‘response’]
  • B. VlanNames[0]
  • C. VlanNames[‘Vlan1’]
  • D. list(VlanNames)
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Vlad_Is_Love_ua
Highly Voted 2 years, 2 months ago
Selected Answer: A
>>> VlanNames = {'response':['vlan1','vlan2','vlan3'],'version':'1.0'} >>> VlanNames['response'] ['vlan1', 'vlan2', 'vlan3']
upvoted 11 times
Steve122
10 months, 2 weeks ago
VlanNames -> Dictionary response -> Key ['vlan1','vlan2','vlan3'] -> Value
upvoted 1 times
...
...
COLONEL_MAJOR
Highly Voted 1 year, 3 months ago
programmer not the network engineer !!!!!
upvoted 7 times
...
Megon
Most Recent 10 months, 1 week ago
VLAnNames is already a variable with value from the returned API calls so and print function showed it so to have access to it just list(VlanNames) will show it
upvoted 1 times
...
[Removed]
11 months, 3 weeks ago
Selected Answer: A
It´s A The key 'response' contains the list of VLANs. To access this list, we need to use the key 'response' on the VlanNames dictionary.
upvoted 1 times
[Removed]
11 months, 1 week ago
...........................
upvoted 1 times
...
...
msstanick
1 year, 11 months ago
Selected Answer: A
As stated by Vlad already it is A. I got it labbed with Cisco's sandbox. url1 = "https://sandboxdnac.cisco.com/dna/intent/api/v1/topology/vlan/vlan-names" VlanNames = requests.get(url=url1, headers=headers, verify=False).json() print("\n\n",VlanNames['response']) ['Vlan1', 'Vlan101'] Process finished with exit code 0
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...