How to complete the challenge PUT /api/challenger/database/guid (Update)
First retrieve your todo database with GET /api/challenger/database/{guid}.
Then send that JSON payload to PUT /api/challenger/database/{guid} with Content-Type: application/json. A successful restore returns 204 No Content.
Try it now
If you want to inspect the todo database payload first, get it with GET /api/challenger/database/{guid}. See the solution.
GET /api/challenger/database/{guid} to get the todo database payload
PUT /api/challenger/database/{guid} to restore the todo database
Lessons Learned
PUT /api/challenger/database/{guid}restores todo data from a previously exported database payload.204 No Contentindicates the restore was accepted without returning the restored dataset.- State restore tests need a follow-up
GET /api/todosto prove the body took effect.
Suggested Experiments
- Change todo data, restore the database export with
PUT, then verify individual todo ids returned. - Remove one todo from the saved database payload and observe how the restore changes the collection.