Recall & Review
beginner
What does HTTP status code 200 mean in an API response?
Status code 200 means OK. It indicates the request was successful and the server returned the requested data.
Click to reveal answer
beginner
What is the purpose of HTTP status code 201 in APIs?
Status code 201 means Created. It shows that a new resource was successfully created on the server.
Click to reveal answer
beginner
When should you use HTTP status code 400 in an API?
Use status code 400 Bad Request when the client sends invalid or malformed data that the server cannot process.
Click to reveal answer
beginner
What does HTTP status code 404 indicate in an API?
Status code 404 means Not Found. It tells the client that the requested resource does not exist on the server.
Click to reveal answer
intermediate
Explain HTTP status code 500 and when it occurs.
Status code 500 means Internal Server Error. It happens when the server encounters an unexpected problem while processing the request.
Click to reveal answer
Which HTTP status code means the API request was successful and data is returned?
✗ Incorrect
200 means OK, the request succeeded and data is returned.
What status code should you return after successfully creating a new resource?
✗ Incorrect
201 means Created, used when a new resource is made.
If the client sends bad data, which status code is appropriate?
✗ Incorrect
400 means Bad Request, used for invalid client data.
Which status code tells the client the requested resource was not found?
✗ Incorrect
404 means Not Found, resource does not exist.
What does status code 500 indicate?
✗ Incorrect
500 means Internal Server Error, a problem on the server.
Describe the main HTTP status codes you would use in a Flask API and what each means.
Think about success, creation, client errors, missing resources, and server errors.
You got /5 concepts.
Explain why it is important to use correct HTTP status codes in API responses.
Consider how clients react to different codes.
You got /5 concepts.