AnsweredAssumed Answered

Getting section assignments dates from the API

Question asked by Bill Lane on Feb 8, 2017
Latest reply on Feb 9, 2017 by Bill Lane

Hi all,


I'm new to Canvas and just finding my way around so hoping I'm missing something and there is a more straight forward solution to my issue.


We have a dashboard in our schools website showing things like todays timetable and upcoming assignments. A problem we have is that some teachers use sections for different classes and their assignments have different due dates. A search through the API using 'courses/course_id/assignments' returns the assignment due date which isn't the same as the due date set in some of the sections for this course.  I have found I can get to this information but it requires the following seperate requests from the API which add considerably to the page load time :

  • Get all assignments for a course
    • courses/course_id/assignments
  • Get the sections for the course with a list of students (to work out our current students section)
    • courses/course_id/sections?include[]=students
  • Get the individual assignment because courses/course_id/assignments doesn't return all_dates
    • courses/course_id/assignments/assignment_id?all_dates=true 

That provides all the data required to find a students actual due date.  I'm hoping there is a more direct path to this that I'm missing.