curl -X GET https://worker.thenewscc.com/quiz/history \
-H "Authorization: Bearer seu_token_jwt"
const response = await fetch('https://worker.thenewscc.com/quiz/history', {
method: 'GET',
headers: {
'Authorization': 'Bearer seu_token_jwt'
}
});
const data = await response.json();
{
"success": true,
"data": {
"attempts": [
{
"id": "attempt_xyz789",
"quizId": "quiz_abc123",
"quizTitle": "quiz do dia - manchete",
"quizDate": "2026-01-18",
"totalQuestions": 10,
"correctAnswers": 8,
"passed": true,
"streakRecovered": true,
"attemptedAt": "2026-01-18T15:30:00.000Z"
},
{
"id": "attempt_uvw456",
"quizId": "quiz_def456",
"quizTitle": "quiz do dia - manchete",
"quizDate": "2026-01-17",
"totalQuestions": 10,
"correctAnswers": 4,
"passed": false,
"streakRecovered": false,
"attemptedAt": "2026-01-17T10:15:00.000Z"
},
{
"id": "attempt_rst123",
"quizId": "quiz_ghi789",
"quizTitle": "quiz do dia - manchete",
"quizDate": "2026-01-16",
"totalQuestions": 10,
"correctAnswers": 7,
"passed": true,
"streakRecovered": true,
"attemptedAt": "2026-01-16T18:45:00.000Z"
}
]
}
}
{
"success": true,
"data": {
"attempts": []
}
}
{
"success": false,
"message": "token de autenticação inválido ou ausente"
}
Usuário
Histórico de Tentativas
Retorna o histórico de todas as tentativas de quiz do usuário
GET
/
quiz
/
history
curl -X GET https://worker.thenewscc.com/quiz/history \
-H "Authorization: Bearer seu_token_jwt"
const response = await fetch('https://worker.thenewscc.com/quiz/history', {
method: 'GET',
headers: {
'Authorization': 'Bearer seu_token_jwt'
}
});
const data = await response.json();
{
"success": true,
"data": {
"attempts": [
{
"id": "attempt_xyz789",
"quizId": "quiz_abc123",
"quizTitle": "quiz do dia - manchete",
"quizDate": "2026-01-18",
"totalQuestions": 10,
"correctAnswers": 8,
"passed": true,
"streakRecovered": true,
"attemptedAt": "2026-01-18T15:30:00.000Z"
},
{
"id": "attempt_uvw456",
"quizId": "quiz_def456",
"quizTitle": "quiz do dia - manchete",
"quizDate": "2026-01-17",
"totalQuestions": 10,
"correctAnswers": 4,
"passed": false,
"streakRecovered": false,
"attemptedAt": "2026-01-17T10:15:00.000Z"
},
{
"id": "attempt_rst123",
"quizId": "quiz_ghi789",
"quizTitle": "quiz do dia - manchete",
"quizDate": "2026-01-16",
"totalQuestions": 10,
"correctAnswers": 7,
"passed": true,
"streakRecovered": true,
"attemptedAt": "2026-01-16T18:45:00.000Z"
}
]
}
}
{
"success": true,
"data": {
"attempts": []
}
}
{
"success": false,
"message": "token de autenticação inválido ou ausente"
}
Descrição
Lista todas as tentativas de quiz realizadas pelo usuário autenticado, incluindo informações sobre o quiz, data, resultado e pontuação. Os resultados são ordenados por data de tentativa (mais recente primeiro).Headers
Token JWT do usuário autenticadoFormato:
Bearer {token}Response
Indica se a operação foi bem-sucedida
Show Dados da resposta
Show Dados da resposta
Lista de tentativas do usuário
Show Estrutura de cada tentativa
Show Estrutura de cada tentativa
ID único da tentativa
ID do quiz
Título do quiz
Data do quiz (formato YYYY-MM-DD)
Total de perguntas no quiz
Quantidade de respostas corretas
Se o usuário passou no quiz
Se o streak foi recuperado
Data/hora da tentativa (formato ISO 8601)
curl -X GET https://worker.thenewscc.com/quiz/history \
-H "Authorization: Bearer seu_token_jwt"
const response = await fetch('https://worker.thenewscc.com/quiz/history', {
method: 'GET',
headers: {
'Authorization': 'Bearer seu_token_jwt'
}
});
const data = await response.json();
{
"success": true,
"data": {
"attempts": [
{
"id": "attempt_xyz789",
"quizId": "quiz_abc123",
"quizTitle": "quiz do dia - manchete",
"quizDate": "2026-01-18",
"totalQuestions": 10,
"correctAnswers": 8,
"passed": true,
"streakRecovered": true,
"attemptedAt": "2026-01-18T15:30:00.000Z"
},
{
"id": "attempt_uvw456",
"quizId": "quiz_def456",
"quizTitle": "quiz do dia - manchete",
"quizDate": "2026-01-17",
"totalQuestions": 10,
"correctAnswers": 4,
"passed": false,
"streakRecovered": false,
"attemptedAt": "2026-01-17T10:15:00.000Z"
},
{
"id": "attempt_rst123",
"quizId": "quiz_ghi789",
"quizTitle": "quiz do dia - manchete",
"quizDate": "2026-01-16",
"totalQuestions": 10,
"correctAnswers": 7,
"passed": true,
"streakRecovered": true,
"attemptedAt": "2026-01-16T18:45:00.000Z"
}
]
}
}
{
"success": true,
"data": {
"attempts": []
}
}
{
"success": false,
"message": "token de autenticação inválido ou ausente"
}
Use este endpoint para mostrar ao usuário um resumo de sua performance nos quizzes, incluindo taxa de aprovação e streaks recuperados.
⌘I
