Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/whitiue/logiMathApp/llms.txt

Use this file to discover all available pages before exploring further.

The Questions API lets you read and add questions scoped to a specific quiz. Both endpoints require a quiz_id path parameter that identifies which quiz the questions belong to. Each question stores the question text, the correct answer, and a difficulty label. The QuestionResponse schema returns id, question_text, and correct_answer — the quiz_id and difficulty are stored in the database but not included in API responses.

GET /quizzes//questions

Returns all questions associated with the specified quiz.

Path parameters

quiz_id
integer
required
The ID of the quiz whose questions you want to retrieve.
curl http://localhost:8000/quizzes/1/questions

Response

Returns an array of QuestionResponse objects.
[
  {
    "id": 1,
    "question_text": "What is the result of 2 + 2?",
    "correct_answer": "4"
  },
  {
    "id": 2,
    "question_text": "Which symbol represents logical AND?",
    "correct_answer": "∧"
  }
]
id
integer
required
Auto-incremented primary key for the question record.
question_text
string
required
The text of the question presented to the learner.
correct_answer
string
required
The expected correct answer for the question.

POST /quizzes//questions

Creates a new question in the specified quiz. All parameters except quiz_id are passed as query parameters.

Path parameters

quiz_id
integer
required
The ID of the quiz to add the question to.

Query parameters

question_text
string
required
The full text of the question.
correct_answer
string
required
The correct answer to the question.
difficulty
string
required
Difficulty level for the question (e.g., "easy", "medium", "hard"). Stored in the database but not returned in the response.
curl -X POST "http://localhost:8000/quizzes/1/questions?question_text=What%20is%202%2B2&correct_answer=4&difficulty=easy"

Response

Returns the created QuestionResponse object.
{
  "id": 3,
  "question_text": "What is 2+2",
  "correct_answer": "4"
}
id
integer
required
Auto-assigned primary key for the newly created question.
question_text
string
required
Question text provided in the request.
correct_answer
string
required
Correct answer provided in the request.
The difficulty parameter is stored in the questions table but is not included in QuestionResponse. It is available in the database for future filtering or display features.

Build docs developers (and LLMs) love