I was able to see one assignment:
url: GET /api/v1/courses/:course_id/assignments/:assignment_id/submissions/?include[]=submission_comments
and am struggling to see all assignments.
I see assignment_id[] "List of assignments to return submissions for. If none are given, submissions for all assignments ar..." but don't seem to be using this right, e.g.,
url: GET /api/v1/courses/:course_id/?include[]=submission_comments&include[]=assignment_id.
In the meantime, I've shown them how to gather this information through Canvas' user interface like the comment library in SpeedGrader and the related ideas in the past years. Thank you!
Solved! Go to Solution.
You need to do multiple API calls and process the results to call the next API endpoint.
First, you need to retrieve all assignments from the course: https://canvas.instructure.com/doc/api/all_resources.html#method.assignments_api.index
Then, given that list of assignment IDs retrieved from the JSON object, you will call the submissions endpoint for each assignment: https://canvas.instructure.com/doc/api/submissions.html#method.submissions_api.index with the include[]=submission_comments parameter.
Then once you have those JSON objects you can process the submission comments.
Hope this helps!
You need to do multiple API calls and process the results to call the next API endpoint.
First, you need to retrieve all assignments from the course: https://canvas.instructure.com/doc/api/all_resources.html#method.assignments_api.index
Then, given that list of assignment IDs retrieved from the JSON object, you will call the submissions endpoint for each assignment: https://canvas.instructure.com/doc/api/submissions.html#method.submissions_api.index with the include[]=submission_comments parameter.
Then once you have those JSON objects you can process the submission comments.
Hope this helps!
You can also simplify it to one API endpoint by using List submissions for multiple assignments
GET /api/v1/courses/:course_id/students/submissions
Include parameters for student_ids[]=all and include[]=submission_comments