300-435 exam dumps

300-435 practice question 247 of 322

Automating Cisco Enterprise Solutions. Professional level, Cisco. Free question with the correct answer and a full explanation.

300-435 Question 247

Select 3

You are tasked with automating the retrieval of device information from a Cisco SD-WAN vManage instance using its REST API. The Python script needs to authenticate with the vManage API, retrieve a list of devices, and print their hostnames. Which of the following steps must be included in your Python script to achieve this functionality?

  1. A

    Send a POST request to the /j_security_check endpoint with valid credentials to establish a session.

  2. B

    Send a GET request to the /device endpoint to retrieve the list of devices.

  3. C

    Include the authentication token in the headers of all subsequent API requests.

  4. D

    Parse the JSON response from the /device endpoint to extract the hostnames.

  5. E

    Use the /template endpoint instead of /device to retrieve device hostnames.

Show answer and explanation

Correct answers: A, C, D

Explanation

To automate the retrieval of device information from Cisco SD-WAN vManage, the script needs to authenticate via the /j_security_check endpoint, use the correct endpoint for device data retrieval (e.g., /dataservice/device), include the session token in subsequent requests, and parse the JSON response to extract the required details. Misusing endpoints or omitting critical steps like authentication and response parsing will result in script failure.

  • A. Correct.

    Correct: To authenticate with the vManage API, a POST request to the /j_security_check endpoint with valid credentials is required to initiate a session.

  • B. Incorrect.

    Incorrect: The /device endpoint does not exist in the vManage API. The correct endpoint for device list retrieval is /dataservice/device.

  • C. Correct.

    Correct: After authenticating, the session token (if required) must be included in the headers for subsequent requests.

  • D. Correct.

    Correct: The JSON response from the /dataservice/device endpoint must be parsed to extract specific information, such as device hostnames.

  • E. Incorrect.

    Incorrect: The /template endpoint is used for configuration templates, not for retrieving device information like hostnames.

Timed practice exam

Take a 300-435 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam