Bird
0
0

Given an interactive API explorer, what will be the HTTP status code returned when you send a GET request to an endpoint that does not exist?

medium📝 Predict Output Q4 of 15
Rest API - API Documentation
Given an interactive API explorer, what will be the HTTP status code returned when you send a GET request to an endpoint that does not exist?
A200 OK
B301 Moved Permanently
C500 Internal Server Error
D404 Not Found
Step-by-Step Solution
Solution:
  1. Step 1: Understand HTTP status codes for missing endpoints

    A request to a non-existent endpoint returns 404 Not Found, indicating the resource is missing.
  2. Step 2: Match status codes to meanings

    200 means success, 500 means server error, 301 means redirect; only 404 fits missing endpoint.
  3. Final Answer:

    404 Not Found -> Option D
  4. Quick Check:

    Missing endpoint = 404 Not Found [OK]
Quick Trick: 404 means resource not found on server [OK]
Common Mistakes:
MISTAKES
  • Assuming 200 means success even if endpoint missing
  • Confusing 500 server error with missing resource
  • Thinking 301 redirect applies here

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes