300-435 Question 258
Select 3You are tasked with writing a Python script to retrieve a list of devices managed by Cisco SD-WAN vManage using its REST API. Which of the following steps should be included to successfully perform this task?
- A
Authenticate with vManage using an API call to obtain a session token or cookie.
- B
Use the '/dataservice/device' endpoint to retrieve the list of devices.
- C
Format the API request using HTTP GET with appropriate headers and authentication details.
- D
Directly send an HTTP request to vManage without authentication as it uses open APIs.
- E
Use Python's 'scp' library to transfer the device list from vManage to your local system.
Show answer and explanation
Correct answers: A, B, C
Explanation
To retrieve a list of devices from Cisco SD-WAN vManage using its REST API, you must first authenticate and obtain a session token or cookie. This token is used in subsequent API requests, such as sending an HTTP GET request to the '/dataservice/device' endpoint with appropriate headers for authentication. Direct API access requires authentication, and file transfer libraries like 'scp' are not used in this context.
- A. Correct.
Correct. Authentication with vManage is mandatory to obtain a session token or cookie for further API interactions.
- B. Correct.
Correct. The '/dataservice/device' endpoint is specifically used to retrieve the list of devices in the vManage system.
- C. Correct.
Correct. Properly formatting the HTTP GET request with headers and authentication details is required to interact with the API.
- D. Incorrect.
Incorrect. Authentication is required for interacting with Cisco SD-WAN vManage APIs; they are not open APIs.
- E. Incorrect.
Incorrect. The 'scp' library is used for file transfers over SSH, which is not relevant for API-based interaction with vManage.