300-435 Question 261
Select 4You are tasked with writing a Python script to retrieve the list of devices in a Cisco SD-WAN environment using the vManage API. Which actions must be implemented in the script to achieve this functionality?
- A
Authenticate with vManage to obtain a session token
- B
Send a POST request to the endpoint
/dataservice/deviceto retrieve the device list - C
Send a GET request to the endpoint
/dataservice/deviceto retrieve the device list - D
Use the session token in the Authorization header for subsequent API requests
- E
Parse the JSON response from the API to extract the device list
Show answer and explanation
Correct answers: A, C, D, E
Explanation
To interact with the Cisco SD-WAN vManage API, the script must follow specific steps: authenticate with vManage to obtain a session token, send a GET request to the appropriate endpoint (e.g., /dataservice/device), include the session token in the Authorization header, and parse the JSON response to extract the desired information. These steps ensure secure and correct retrieval of data from the API.
- A. Correct.
Authenticating with vManage to obtain a session token is a required step to interact with the API securely.
- B. Incorrect.
A POST request is not appropriate for retrieving data; it is typically used for creating or updating resources.
- C. Correct.
A GET request is the correct method for retrieving data, such as the device list, from the vManage API.
- D. Correct.
The session token obtained during authentication must be included in the Authorization header for API calls to be authorized.
- E. Correct.
The JSON response from the API must be parsed to extract the required information (e.g., the device list).