350-701 · Question #373
Refer to the exhibit. What is the result of the Python script?
The correct answer is B. It uses the POST HTTP method to obtain a token to be used for authentication. The Python function dnac_login() performs the following: Constructs a URL to the Cisco DNA Center authentication endpoint. Sends a POST request to https://<host>/api/system/v1/auth/token. Uses HTTP Basic Authentication with a username and password. Returns the authentication…
Question
Refer to the exhibit. What is the result of the Python script?
Exhibit
Options
- AIt uses the POST HTTP method to obtain a username and password to be used for
- BIt uses the POST HTTP method to obtain a token to be used for authentication.
- CIt uses the GET HTTP method to obtain a token to be used for authentication.
- DIt uses the GET HTTP method to obtain a username and password to be used for authentication
How the community answered
(66 responses)- A9% (6)
- B70% (46)
- C18% (12)
- D3% (2)
Explanation
The Python function dnac_login() performs the following: Constructs a URL to the Cisco DNA Center authentication endpoint. Sends a POST request to https://<host>/api/system/v1/auth/token. Uses HTTP Basic Authentication with a username and password. Returns the authentication token extracted from the JSON response: response.json()["Token"].
Topics
Community Discussion
No community discussion yet for this question.
