JSON API.
Answer 3 of 4 correctly to clear this round.
A new private column is added to tasks. What keeps the public response stable?
Give me a hint
Think about where you chose the fields that a client could read.
An explicit resource defines what clients receive even when the underlying table gains a column.
Review the lessonClients can choose per_page. Which rule keeps one request from loading the whole collection?
Give me a hint
In the browser example, when did the request for 51 tasks get rejected?
A server-enforced page size limits the database query. Slicing a full collection happens after it has already been loaded.
Review the lessonOnly title is writable on creation. A client also sends done: true. Which write respects that contract?
POST /api/v1/tasks
{"title":"Write tests","done":true}Give me a hint
An input can have the right type and still be a field the client cannot set.
The creation rule permits title. Leaving done to its server-defined default prevents clients from choosing the initial state.
Review the lessonHow would you catch a regression that returns HTTP 201 but never saves the task?
Give me a hint
Imagine refreshing the page. Where would the app read the new task from?
A successful status and a persisted row are distinct parts of the write contract. Exercise both through the endpoint.
Review the lessonRevisit the missed topics
This browser could not save your score.
My challenge recordEach answer is worth 25 points. Replays keep your highest score.