I am trying to download student submissions via the API using the following call.
GET /api/v1/courses/:course_id/assignments/:assignment_id/submissions?parameters[workflow_state]=submitted¶meters[grade_matches_current_submission]=false
When I run the call its returns all submissions. Is there a way to only get submissions and resubmissions that haven't been graded?
Hi Theresa,
I have double checked the API specification, unfortunately there is no way to pass a filter to Canvas to only return the ungraded results.
For the Submissions API you would need to take the results and then filter on grader_id = null (for all ungraded submissions as per the below) Submissions - Canvas LMS REST API Documentation
grader_id
The id of the user who graded the submission. This will be null for submissions that haven't been graded yet. It will be a positive number if a real user has graded the submission and a negative number if the submission was graded by a process (e.g. Quiz autograder and autograding LTI tools). Specifically autograded quizzes set grader_id to the negative of the quiz id. Submissions autograded by LTI tools set grader_id to the negative of the tool id.
Would that satisfy what you are looking for, it is not ideal, but it does give you the ability to rapidly filter out graded results?
Cheers,
Stuart
(Ooh also sharing into Canvas Developers in case anyone has any delightfully creative solutions)