Updates an existing question in a CAT. Can modify question text, options, marks, or correct answers.
Body
Required
Updated question data (partial update supported)
-
Type of question: STRUCTURED (MCQ, auto-gradable) or UNSTRUCTURED (open-ended, essay)
Values are
STRUCTUREDorUNSTRUCTURED. -
Options for structured questions (MCQ). Required for STRUCTURED type, ignored for UNSTRUCTURED
-
Correct answers for auto-grading. Required for STRUCTURED type, ignored for UNSTRUCTURED
-
Maximum score/marks for this question
PATCH
/api/v1/cats/{id}/question/{question}
curl \
--request PATCH 'https://api.echoplain.social/api/v1/cats/123e4567-e89b-12d3-a456-426614174000/question/456e7890-e89b-12d3-a456-426614174001' \
--header "Content-Type: application/json" \
--data '{"question":"string","type":"STRUCTURED","options":["string"],"correctAnswers":["string"],"maxScore":42.0}'
Request examples
{
"question": "string",
"type": "STRUCTURED",
"options": [
"string"
],
"correctAnswers": [
"string"
],
"maxScore": 42.0
}
Response examples (200)
{
"message": "Question updated successfully",
"question": {
"id": "456e7890-e89b-12d3-a456-426614174001",
"type": "MULTIPLE_CHOICE",
"marks": 3,
"options": [
"Paris",
"London",
"Berlin",
"Madrid"
],
"question": "What is the capital city of France?"
}
}