AnsweredAssumed Answered

Performance of Canvas rest API?

Question asked by Ulrik Sandgren on May 19, 2020

We have a new integration for our Canvas, the integration uses the Canvas rest API for creating courses and enrolments. Courses are created well spread during time but when it comes to enrolment we expect a huge amount at the same time.

All requests are synchronized so there will not be any parallel calls to Canvas. A typical enrolment for our integration includes these rest API calls(finding user, finding course, finding section, enrol to section):

GetAsync uri:/api/v1/accounts/self/users?search_term=xxyy 2020-05-18 07:10:20Z 6052 33
GetAsync uri:/api/v1/courses/593 2020-05-18 07:10:21Z 6052 33
GetAsync uri:/api/v1/courses/593/sections?per_page=500 2020-05-18 07:10:21Z 6052 33
PostAsync uri:/api/v1/courses/593/enrollments, body:{ "enrollment": { "user_id": "29049", "role_id": 3, "enrollment_state": "active", "course_section_id": 542, "notify": false }} 2020-05-18 07:10:21Z 6052 33

Normally an enrolment takes 2-4 seconds.

Should we expect some kind of problems if trying to make ten thousands enrolments in a sequence?

We have heard some rumors about the rest API is not 100% reliable and that it would be better to use the csv API feature. 


Are there any experience on this issue?