Blueprint Templates API

BETA: This API resource is not finalized, and there could be breaking changes before its final release.

Configure blueprint courses

A BlueprintTemplate object looks like:

{
  // The ID of the template.
  "id": 1,
  // The ID of the Course the template belongs to.
  "course_id": 2,
  // Time when the last export was completed
  "last_export_completed_at": "2013-08-28T23:59:00-06:00"
}

A BlueprintMigration object looks like:

{
  // The ID of the migration.
  "id": 1,
  // The ID of the template the migration belongs to.
  "template_id": 2,
  // The ID of the user who queued the migration.
  "user_id": 3,
  // Current state of the content migration: queued, exporting, imports_queued,
  // completed, exports_failed, imports_failed
  "workflow_state": "running",
  // Time when the migration was queued
  "created_at": "2013-08-28T23:59:00-06:00",
  // Time when the exports begun
  "exports_started_at": "2013-08-28T23:59:00-06:00",
  // Time when the exports were completed and imports were queued
  "imports_queued_at": "2013-08-28T23:59:00-06:00",
  // Time when the imports were completed
  "imports_completed_at": "2013-08-28T23:59:00-06:00"
}

Get blueprint information MasterCourses::MasterTemplatesController#show

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/courses/:course_id/blueprint_templates/:template_id

Using 'default' as the template_id should suffice for the current implmentation (as there should be only one template per course). However, using specific template ids may become necessary in the future

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
Returns a BlueprintTemplate

Get associated course information MasterCourses::MasterTemplatesController#associated_courses

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/courses/:course_id/blueprint_templates/:template_id/associated_courses

Returns a list of courses that are configured to receive updates from this blueprint

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/associated_courses \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
Returns a list of Courses

Update associated courses MasterCourses::MasterTemplatesController#update_associations

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

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.

Request Parameters:

Parameter Type Description
course_ids_to_add Array

Courses to add as associated courses

course_ids_to_remove Array

Courses to remove as associated courses

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/update_associations \
-X PUT \
-H 'Authorization: Bearer <token>' \
-d 'course_ids_to_add[]=1' \
-d 'course_ids_to_remove[]=2' \

Begin a migration to push to associated courses MasterCourses::MasterTemplatesController#queue_migration

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

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.

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/migrations \
-X POST \
-H 'Authorization: Bearer <token>'
Returns a BlueprintMigration

List blueprint migrations MasterCourses::MasterTemplatesController#migrations_index

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/courses/:course_id/blueprint_templates/:template_id/migrations

Shows migrations for the template, starting with the most recent

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/migrations \
-H 'Authorization: Bearer <token>'
Returns a list of BlueprintMigrations

Show a blueprint migration MasterCourses::MasterTemplatesController#migrations_show

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/courses/:course_id/blueprint_templates/:template_id/migrations/:id

Shows the status of a migration

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/migrations/:id \
-H 'Authorization: Bearer <token>'
Returns a BlueprintMigration