The templating is done using the content migration endpoints Content Migrations - Canvas LMS REST API Documentation and doing a course copy over the newly created course.
The call looks something like this:
curl 'https://<canvas>/api/v1/courses/sis_course_id:<course_sis_id>/content_migrations' \
-F 'migration_type=course_copy_importer' \
-F 'settings[source_course_id]=sis_course_id:<template_course_sis_id>' \
-H 'Authorization: Bearer <token>'
NB: We don't actually use cURL for this but rather a bunch of ruby libraries, this is just an example of how to do it.
We currently still use the CSV endpoints to sync our courses to canvas. So we keep track of the already templated courses and add any course not in the list to a queue for templating. Then another process polls canvas until the course is there and then calls the content migration endpoint. It then polls the progress_url (which is returned from the POST above) until the course_copy is done and then the course is added to list of already templated courses.
This all happens as part of our integration middleware service.
We are planning to use the live events for course creation in the future as that is a better approach, since we can't use blueprints for the reasons Mark Wittervan mentioned.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.