Conversation With API Builders

Learn more about REST API interactions

Table of Contents

Show Exercises

1.
Response should be valid JSON even when things go wrong

2.
Return 400 when invalid request payload

3.
Return 422 when the input data is invalid

4.
Return 401 when the user is not authenticated

5.
Return 403 when the user is not authorized

6.
Return 404 when no record is found

7.
Return 500 when an error is encountered

8.
Success key not needed in response

9.
Do not use redirect in API

10.
Return 200 when it's all good