0
0
Rest APIprogramming~20 mins

Why status codes communicate outcomes in Rest API - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Status Code Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
1:00remaining
What is the HTTP status code returned for a successful GET request?

Consider a REST API where a client requests data with a GET method. The server successfully finds and returns the requested resource.

What HTTP status code should the server send back to communicate this successful outcome?

A301
B404
C200
D500
Attempts:
2 left
💡 Hint

Think about the standard code that means 'OK' or 'Success'.

Predict Output
intermediate
1:00remaining
What status code indicates a resource was not found?

A client requests a resource that does not exist on the server. What HTTP status code should the server return to communicate this?

A404
B200
C403
D201
Attempts:
2 left
💡 Hint

This code means 'Not Found'.

Predict Output
advanced
1:30remaining
What status code does the server return after successfully creating a resource?

A client sends a POST request to create a new resource. The server creates it successfully. What HTTP status code should the server return?

A200
B201
C204
D400
Attempts:
2 left
💡 Hint

This code means 'Created'.

Predict Output
advanced
1:30remaining
What status code indicates the client sent a bad request?

If a client sends a request with invalid syntax or missing required data, what HTTP status code should the server return?

A400
B401
C403
D500
Attempts:
2 left
💡 Hint

This code means 'Bad Request'.

Predict Output
expert
2:00remaining
What status code indicates the server encountered an unexpected error?

When a server fails unexpectedly while processing a valid request, what HTTP status code should it return to communicate this server error?

A400
B503
C502
D500
Attempts:
2 left
💡 Hint

This code means 'Internal Server Error'.