300-435 Question 262
Select 3You are tasked with automating the retrieval of device inventory data from Cisco SD-WAN vManage using its REST API. Which steps should you implement in your Python script to successfully authenticate and retrieve the data?
- A
Send a POST request to the vManage API's authentication endpoint with valid credentials to retrieve a session token.
- B
Store the session token in a cookie and include it in the headers for subsequent API requests.
- C
Initiate a WebSocket connection to vManage to authenticate and fetch data more efficiently.
- D
Send a GET request to the '/device/inventory' API endpoint with the session token included in the headers.
- E
Use HTTP Basic Authentication for all API requests to avoid the need for session tokens.
Show answer and explanation
Correct answers: A, B, D
Explanation
To interact with the Cisco SD-WAN vManage API, you must first authenticate by sending a POST request to the authentication endpoint with valid credentials. This provides a session token, which must then be stored (typically in a cookie) and included in the headers of subsequent API requests. The device inventory data can be fetched by sending a GET request to the '/device/inventory' API endpoint with the session token. WebSocket connections and HTTP Basic Authentication are not applicable to the vManage REST API.
- A. Correct.
Correct. The vManage API requires authentication using a POST request to the authentication endpoint, which provides a session token for further requests.
- B. Correct.
Correct. After retrieving the session token, it should be included in a cookie or headers for subsequent API requests to maintain authentication.
- C. Incorrect.
Incorrect. The vManage API does not use WebSocket connections for authentication or data retrieval; it relies on REST API calls.
- D. Correct.
Correct. To retrieve device inventory, you need to send a GET request to the '/device/inventory' API endpoint, including the session token in the headers.
- E. Incorrect.
Incorrect. The vManage API does not support HTTP Basic Authentication; it requires session-based authentication using tokens.