The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Blueprint Courses - Canvas LMS REST API Documentation
When adding courses to associate, the call doesn't automatically seem to sync the added courses. Is it meant to automatically sync, or is the migrations call required immediately afterwards to sync?
After playing with the Blueprint course experience in the UI, the secondary API call to migrations endpoint would be more desirable as to when to control exactly when to sync content. If you associated a course in the UI you have to sync separately from that so I imagine that the API mimics what the user experience is in the UI.
Someone more knowledgeable could probably say differently, so those are my assumptions.
Jeffrey,
I kind of thought maybe this is the intended way for the API to way, but it would be good to know for sure, so there are no surprises later. I have had it happen through the UI, that if I associated a course with the Blueprint course, as soon as I added it, it would sync. It's possible that was a bug and not the intended behavior in the UI because I just retested that and the associated course did not sync after being added.
Andrea
I think after the initial association through the API, the course(s) do need to be synced for the first time, otherwise, in the UI, there seems to be no way to sync/update associations.
When associating courses initially, through the UI, they do sync automatically and then if changes are made in the Blueprint template, the option is there to sync changes.
When associating the courses through the API, without immediately syncing afterwards, it doesn't seem to matter how many changes are made in the template, the option to sync is not available. This seems a little buggy to me.
I created an idea - Blueprint API should behave the same as the Blueprint tool
I was hoping to vote for this, but it is in cold storage. Is there a similar idea somewhere?
Not that I know of. I haven't tested in a while to see if the behavior has changed.
Oh, the behavior has not changed. Using API to associate a course with a blueprint does not then cause that course to be synced with the blueprint. I can't find an API command to make that happen for one course. 😕
Doesn't this work?
Blueprint Courses - Canvas LMS REST API Documentation
PUT /api/v1/courses/:course_id/blueprint_templates/:template_id/update_associations
Send a list of course ids to add or remove new associations for the template. Cannot add courses that do not belong to the blueprint course's account. Also cannot add other blueprint courses or courses that already have an association with another blueprint course.
Replace the :template_id with default, add the array of course_ids_to_add
I use Insomnia and add the a json body {"course_ids_to_add": [123]}
POST /api/v1/courses/:course_id/blueprint_templates/:template_id/migrations
Begins a migration to push recently updated content to all associated courses. Only one migration can be running at a time.
:course_id is the blueprint course
The PUT process works fine to associate a course with a blueprint. I'm concerned about the migration, though. I don't want *all* courses attached to the blueprint to be resynced every time I add and associate a new course through the API. I need a way to sync just the one course. Like you, I'd like to see the association process also trigger the sync to that one course, just like the UI process does.
I just came across your other post that states the blueprint template id needs to be used instead of the original 'default' in the api call. I don't remember that change in the release notes or listed in the API change log. I need to retest and see how this works now, UI vs API.
As for the association process, you could always create a new idea. Maybe this time it will get more votes.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in