200-901 Question 44
Single answerA developer is working with a REST API that retrieves data about network devices. During testing, they encounter the following HTTP response code: 404. What does this response code indicate?
- A
The request was successful, and the server returned the requested data.
- B
The requested resource could not be found on the server.
- C
The client does not have the necessary permissions to access the resource.
- D
The server encountered an unexpected error while processing the request.
Show answer and explanation
Correct answer: B
Explanation
HTTP response code 404 is one of the most common response codes in REST APIs. It indicates that the requested resource could not be found on the server, which often happens if the endpoint is incorrect or the resource does not exist. Understanding these response codes is essential when troubleshooting and interacting with APIs.
- A. Incorrect.
This is incorrect. A 200 response code indicates success, but a 404 response code means the resource was not found.
- B. Correct.
This is correct. A 404 response code means the requested resource does not exist on the server, or the endpoint is incorrect.
- C. Incorrect.
This is incorrect. A 403 response code indicates a permission issue, not a missing resource.
- D. Incorrect.
This is incorrect. A 500 response code indicates a server-side error, not a missing resource.