300-435 · Question #158
Refer to the exhibit (Python code above). A Python script for vManage API calls fails with HTTP 400. Which action resolves the issue?
The correct answer is B. Use required syntax for the URL address. An HTTP 400 Bad Request error from a vManage API script indicates the URL is malformed or uses incorrect syntax, which is resolved by correcting the URL format.
Question
Options
- AImport the necessary modules into the script.
- BUse required syntax for the URL address.
- CDefine the environment variables.
- DChange the access level.
How the community answered
(29 responses)- A7% (2)
- B90% (26)
- C3% (1)
Why each option
An HTTP 400 Bad Request error from a vManage API script indicates the URL is malformed or uses incorrect syntax, which is resolved by correcting the URL format.
Missing module imports would cause a Python ImportError or NameError before the HTTP request is even made - they would not result in an HTTP 400 response.
HTTP 400 Bad Request is returned by the server when it cannot process the request due to malformed syntax, which in this context means the URL address does not conform to the required format for the vManage API endpoint. Correcting the URL structure to match the API specification resolves the 400 error and allows the request to be processed successfully.
Undefined environment variables would raise a Python KeyError or return None before the request executes, not produce an HTTP 400 from the server.
Insufficient access level would return HTTP 403 Forbidden, not HTTP 400 Bad Request.
Concept tested: HTTP 400 error diagnosis for malformed API URL
Source: https://developer.cisco.com/docs/sdwan/
Topics
Community Discussion
No community discussion yet for this question.