A simple engine for creating and solving quizzes through HTTP API.
H2 database was used to store all the data.
API supports creating, getting, solving and deleting quizzes. Each quiz is described by id, title, text and array of correct answers. Answer is not visible in the API.
To perform any actions with quizzes user have to be registrated and then authorized via HTTP Basic Auth. Otherwise, the service returns the HTTP 401 (Unauthorized)
code.
POST: /api/register
POST: /api/quizzes
GET: /api/quizzes/{id}
GET: /api/quizzes/{id}/solve
Deleting quiz is only possible for user that created it.
DELETE: /api/quizzes/{id}
GET: /api/quizzes
Default value is 10 quizzes per page, starting from first page, sorted by id.
For getting 5 quizzes per page, page 2:
GET: /api/quizzes?size=5&page=1
Shows all completions of quizzes by current user. For one quiz there can be multiple completions.
GET: /api/quizzes/completed