Hi everyone,
I'm trying to programmatically relate quiz item(question) definitions to their corresponding results in New Quizzes reports(Student Analysis specifically), but I'm encountering a mismatch in Item IDs.
The Problem:
When I call the New Quizzes Items API:
GET /api/quiz/v1/courses/{course_id}/quizzes/{assignment_id}/items
I get item IDs like 1274, 1275:
json
[ {"id": "1274", "position": 1, "entry": {"title": "which of the following..."}}, {"id": "1275", "position": 2, "entry": {"title": "which of the following..."}}]
However, when I download the Quiz and Item Analysis Report or Student Analysis Report (via UI or Reports API), the ItemIDs are completely different: 1227, 1228.
What I've Tried:
- Title matching - Won't work because multiple questions can have identical titles (as in my case)
- Position matching - Works as a workaround, but feels fragile and undocumented
/api/quiz_sessions endpoint - I found this in the Quiz API documentation, but it returns 404 on my instance/api/quiz/v1/courses/{course_id}/quizzes/{assignment_id}/quiz_session_results - Also returns 404
My Questions:
- What is the correct API endpoint or method to map quiz item definition IDs(or question IDs) to the ItemIDs used in reports?
- Are the
/api/quiz_sessions endpoints available in all Canvas instances, or are they internal/restricted? - Is there a documented relationship between these two ID systems?
Any guidance would be greatly appreciated.
Thanks!