Request body:
{
"email": "nam123@gmail.com",
"password": 12345678
}
Response: 200 OK
Request body:
{
"title": "The Java Logo",
"text": "What is depicted on the Java logo?",
"options": ["Robot","Tea leaf","Cup of coffee","Bug"],
"answer": [2]
}
Response: 200 OK
GET api/quizzes/0
Response:
{
"id": 0,
"title": "The Java Logo",
"text": "What is depicted on the Java lo2222222go?",
"options": [
"Robot",
"Tea leaf",
"Cup of coffee",
"Bug"
]
}
Request sample: GET: api/quizzes?page=0&size=10&sortedBy=id
Response:
{
"totalPages": 1,
"totalElements": 1,
"first": true,
"last": true,
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"number": 0,
"numberOfElements": 1,
"size": 10,
"empty": false,
"pageable": {
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"offset": 0,
"pageNumber": 0,
"pageSize": 10,
"paged": true,
"unpaged": false
},
"content": [
{
"id": 0,
"title": "The Java Logo",
"text": "What is depicted on the Java lo2222222go?",
"options": [
"Robot",
"Tea leaf",
"Cup of coffee",
"Bug"
]
}
]
}
Request sample: api/quizzes/0/solve
Request body: {answer: [2]}
Response:
{
"success": true,
"feedback": "Congratulations, you're right!"
}
Request sample: api/quizzes/0
Response: 204 No Content
Response:
{
"totalPages": 1,
"totalElements": 1,
"last": true,
"first": true,
"empty": false,
"content": [
{
"completedAt": "2021-09-17T17:51:26.244079",
"id": 0
}
]
}