We need a way to apply the content of a blueprint to a course newly associated with that blueprint via API. This would provide functional parity with both the UI and SIS Import process.
Consider the UI process of accessing the Associations sidebar of a blueprint, selecting a course to associate and saving. After a few minutes, the content of the blueprint automatically appears in the newly associated course.
Compare this behavior to an SIS Import process that creates a new course and associates it with a blueprint course. The content of the blueprint is automatically migrated to the course.
And finally, once a course is associated with a blueprint using API, the association is all that is established. The content of the blueprint is never migrated to the course unless a blueprint migration is called, which syncs all associated courses.
There is not parity of functionality of the API to cause the newly associated course to receive the content of the blueprint.
The existing API enpoint and method
GET /api/v1/courses/:course_id/blueprint_subscriptions/subscription_id/migrations
Returns the status of any migrations. https://canvas.instructure.com/doc/api/blueprint_courses.html#method.master_courses/master_templates.imports_index
Adding a migration ID to that endpoint provides the status of a particular migration. https://canvas.instructure.com/doc/api/blueprint_courses.html#method.master_courses/master_templates.imports_show
I suggest adding a PUT method for the existing API
PUT /api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/migrations
that invokes a migration to the course_id specified.
Consider this API workflow:
- POST /api/v1/accounts/:account_id/courses (with the appropriate parameters)
- Receive the new course_id
- PUT /api/v1/courses/:(bp)course_id/blueprint_templates/:template_id/update_associations?course_ids_to_add[]={{course_id from step 1a}}
- Receive success
- GET /api/v1/courses/:course_id/blueprint_subscriptions (course_id from step 1a)
- Receive subscription_id
- (Another idea would be to have step 2 return the subscription_id - this step then no longer needed)
- PUT /api/v1/courses/:course_id/blueprint_subscriptions/subscription_id/migrations (course_id from step 1a, subscription_id from step 3a)
Thank you for your consideration.