200-901 · Question #529
Refer to the exhibit. A network engineer must automate a workflow to get device volume data from Endpoint xAPI-enabled devices. The engineer prepares a Python script to send the request by adding an…
The correct answer is A. Access token must be changed with a valid one. An HTTP status code of 401 Unauthorized indicates that the client's request lacks valid authentication credentials for the target resource.
Question
Refer to the exhibit. A network engineer must automate a workflow to get device volume data from Endpoint xAPI-enabled devices. The engineer prepares a Python script to send the request by adding an access token and device ID. However, the request receives a status code of 401. Which action solves the problem?
Exhibit
Options
- AAccess token must be changed with a valid one.
- BNetwork connectivity between client and API must be fixed.
- CInternal server problems that relate to code must be fixed.
- DAPI endpoint must be restarted to serve again.
How the community answered
(30 responses)- A90% (27)
- B7% (2)
- D3% (1)
Why each option
An HTTP status code of 401 Unauthorized indicates that the client's request lacks valid authentication credentials for the target resource.
An HTTP 401 status code explicitly means 'Unauthorized', indicating that the authentication credentials provided with the request, such as an access token, are either missing, invalid, or expired. Replacing the token with a valid one will resolve this authentication failure.
Network connectivity problems typically result in different error types, such as connection refused, timeout, or host unreachable, rather than a 401 status code.
Internal server problems usually manifest as 5xx HTTP status codes (e.g., 500 Internal Server Error), not a 401 Unauthorized error.
Restarting the API endpoint is a troubleshooting step for server-side issues, but a 401 error specifically points to client authentication failure, not necessarily a server endpoint problem that requires a restart.
Concept tested: HTTP 401 Unauthorized status code
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
Topics
Community Discussion
No community discussion yet for this question.
