Setting quiz due dates via Canvas API

Jump to solution
gbhenry
Community Member
I can GET the quiz_assignment_overrides but can't figure out how to POST.  Here is an example of a quiz that I set up in Canvas with multiple sections and due dates.  I would like to be able to POST this information so it doesn't take as long.
 
{
    "quiz_assignment_overrides": [
        {
            "quiz_id"3165761,
            "due_dates": [
                {
                    "id"855848,
                    "due_at""2021-06-11T05:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q0 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645475
                },
                {
                    "id"855849,
                    "due_at""2021-08-20T05:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q1 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645483
                },
                {
                    "id"855850,
                    "due_at""2021-10-29T05:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q2 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645491
                },
                {
                    "id"855851,
                    "due_at""2022-01-21T06:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q3 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645501
                },
                {
                    "id"855853,
                    "due_at""2022-03-25T05:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q4 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645508
                }
            ],
            "all_dates": [
                {
                    "id"855848,
                    "due_at""2021-06-11T05:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q0 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645475
                },
                {
                    "id"855849,
                    "due_at""2021-08-20T05:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q1 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645483
                },
                {
                    "id"855850,
                    "due_at""2021-10-29T05:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q2 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645491
                },
                {
                    "id"855851,
                    "due_at""2022-01-21T06:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q3 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645501
                },
                {
                    "id"855853,
                    "due_at""2022-03-25T05:59:00Z",
                    "unlock_at"null,
                    "lock_at"null,
                    "title""Q4 A SM2Honors Henry.G SY21-22",
                    "set_type""CourseSection",
                    "set_id"1645508
                }
            ]
        }
   ]
}
Labels (1)
0 Likes
1 Solution
James
Community Champion

@gbhenry 

The quiz assignment overrides API endpoints are read-only. To set an assignment override, even for quizzes, use the Assignments API instead. Note that when creating an override (POST),  you won't include the id since there won't be one yet. The documentation explains what needs sent.

View solution in original post