200-901 · Question #335
Refer to the exhibit. A developer writes a script to create a new network by using the Cisco DNA Center API. After running the script for the first time, the developer observes that HTTP code 404 is…
The correct answer is B. The API URL must be changed with a valid URL. An HTTP 404 Not Found error indicates that the server could not find the requested resource.
Question
Refer to the exhibit. A developer writes a script to create a new network by using the Cisco DNA Center API. After running the script for the first time, the developer observes that HTTP code 404 is printed to the console. Which action resolves the problem?
Exhibit
Options
- AThe x-auth-token value must be changed to a valid token.
- BThe API URL must be changed with a valid URL.
- CThe requested payload must be fixed to include missing parts.
- DInternal errors on the code of API server must be fixed.
How the community answered
(25 responses)- B96% (24)
- D4% (1)
Why each option
An HTTP 404 Not Found error indicates that the server could not find the requested resource.
An invalid `x-auth-token` would typically result in an HTTP 401 Unauthorized or 403 Forbidden error, not 404.
An HTTP 404 Not Found status code specifically means that the server could not find a resource at the specified URL. This typically points to an incorrect or malformed API endpoint URL in the script, and changing it to a valid URL will resolve the issue.
An incorrect or missing payload would usually result in an HTTP 400 Bad Request error.
Internal server errors are indicated by HTTP 5xx status codes, such as 500 Internal Server Error, not 404.
Concept tested: HTTP status codes (404 Not Found)
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404
Topics
Community Discussion
No community discussion yet for this question.
