Check a practice exam without saving it
post
https://mudey.fr/api/v1/courses/{courseId}/lessons/{lessonId}/exam/validatecourses:writeDry run: the same checks as POST and PATCH (domain weights, each question's domain, quota covered per domain, answers, bounds), nothing is written. Whatever is not sent is taken from the saved exam.
Authorization: Bearer mudey_sk_… header required. Create and use a key
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| courseId* | path | string | |
| lessonId* | path | string |
JSON body
Fields marked * are required.
| Field | Type | Description |
|---|---|---|
| exam | ExamSettings | |
| questions | QuizQuestionInput[] |
Responses
200Check result (valid, problems).401Missing, invalid, revoked or expired key.403Missing permission on the key, or the account is no longer an instructor.404Resource not found among your courses.422The lesson is not a practice exam (not_an_exam).429Rate limit exceeded (300 calls per minute per key). See the Retry-After header.
Example
export MUDEY_API_KEY="mudey_sk_..."
export COURSE_ID="..." # replace me
export LESSON_ID="..." # replace me
curl -X POST "https://mudey.fr/api/v1/courses/$COURSE_ID/lessons/$LESSON_ID/exam/validate" \
-H "Authorization: Bearer $MUDEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"exam": {
"durationMinutes": 120,
"questionCount": 2,
"passPercent": 70,
"scale": {
"min": 0,
"max": 1000,
"pass": 700
},
"domains": [
{
"code": "D1",
"name": "Security Principles",
"weight": 50
},
{
"code": "D2",
"name": "Network Security",
"weight": 50
}
],
"maxAttempts": null,
"cooldownHours": 24,
"shuffleAnswers": true,
"examLabel": "ISC2 CC preparation"
},
"questions": [
{
"domain": "D1",
"prompt": "Which principle limits each account to the rights it needs?",
"relatedLessonId": null,
"answers": [
{
"text": "Least privilege",
"correct": true,
"explanation": "Each account gets only what its job requires."
},
{
"text": "Defense in depth",
"correct": false,
"explanation": "Several layers of controls, not a limit on rights."
}
]
},
{
"domain": "D2",
"prompt": "Which port does HTTPS use by default?",
"relatedLessonId": null,
"answers": [
{
"text": "443",
"correct": true,
"explanation": "HTTP over TLS listens on 443."
},
{
"text": "80",
"correct": false,
"explanation": "80 is plain HTTP."
}
]
}
]
}'