nerdexam
Cisco

300-435 · Question #132

Drag and drop the code snippets from the bottom onto the boxes in the code to complete the get device list function that uses the vManage Administration API to retrieve a list of devices in the…

This question tests the ability to construct a Python function using the Cisco vManage REST API to retrieve the list of devices participating in an SD-WAN overlay network. It validates knowledge of the correct API endpoint, session handling, authentication flow, and JSON…

Controller-Based Network Automation

Question

Drag and drop the code snippets from the bottom onto the boxes in the code to complete the get device list function that uses the vManage Administration API to retrieve a list of devices in the overlay network that connects to the vManage NMS. Not all options are used.

Explanation

This question tests the ability to construct a Python function using the Cisco vManage REST API to retrieve the list of devices participating in an SD-WAN overlay network. It validates knowledge of the correct API endpoint, session handling, authentication flow, and JSON response parsing.

Approach. The correct approach follows the standard vManage REST API pattern: (1) create a persistent session using requests.Session(), (2) authenticate by POSTing credentials to /j_security_check with j_username and j_password form fields, (3) optionally fetch a CSRF token via GET /dataservice/client/token and attach it as the X-XSRF-TOKEN header, (4) call GET /dataservice/device to retrieve device inventory, and (5) parse the response with .json()['data'] since vManage wraps its payload in a top-level data key. The verify=False flag is typically required because vManage uses self-signed TLS certificates. The function should return the list extracted from response.json()['data'], which contains each device's system-IP, hostname, reachability status, and device type.

Concept tested. Cisco vManage SD-WAN REST API usage - specifically the device inventory endpoint (GET /dataservice/device), session-based authentication via /j_security_check, CSRF token handling, and correct JSON response extraction using the data key. This maps to Cisco DevNet Associate/Professional and CCNP SD-WAN exam objectives around programmability of SD-WAN controllers.

Reference. Cisco DevNet: vManage REST API documentation - 'Device and Feature Template APIs'; Cisco SD-WAN REST API Getting Started Guide (developer.cisco.com/sdwan)

Topics

#vManage API#SD-WAN Automation#REST API#Python

Community Discussion

No community discussion yet for this question.

Full 300-435 Practice