BlueprintMigration¶
-
class
canvasapi.blueprint.
BlueprintMigration
(requester, attributes)¶ Parameters: - requester (
canvasapi.requester.Requester
) – The requester to pass HTTP requests through. - attributes (dict) – The JSON object to build this object with.
-
get_details
(**kwargs)¶ Return the changes that were made in a blueprint migration.
Calls: GET /api/v1/courses/:course_id/blueprint_templates/:template_id /migrations/:id/details Return type: canvasapi.paginated_list.PaginatedList
ofcanvasapi.blueprint.ChangeRecord
-
get_import_details
(**kwargs)¶ Return changes that were made to a course with a blueprint.
Calls: GET /api/v1/courses/:course_id/blueprint_subscriptions/ :subscription_id/migrations/:id/details Return type: canvasapi.paginated_list.PaginatedList
ofcanvasapi.blueprint.ChangeRecord
- requester (
BlueprintSubscription¶
-
class
canvasapi.blueprint.
BlueprintSubscription
(requester, attributes)¶ Parameters: - requester (
canvasapi.requester.Requester
) – The requester to pass HTTP requests through. - attributes (dict) – The JSON object to build this object with.
-
list_blueprint_imports
(**kwargs)¶ Return a list of migrations imported into a course associated with a blueprint.
Calls: GET /api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/ migrations Return type: canvasapi.paginated_list.PaginatedList
ofcanvasapi.blueprint.BlueprintMigration
-
show_blueprint_import
(migration, **kwargs)¶ Return the status of an import into a course associated with a blueprint.
Calls: GET /api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/ migrations/:id Parameters: migration (int or canvasapi.blueprint.BlueprintMigration
) – migration id or objectReturn type: canvasapi.blueprint.BlueprintMigration
- requester (
BlueprintTemplate¶
-
class
canvasapi.blueprint.
BlueprintTemplate
(requester, attributes)¶ Parameters: - requester (
canvasapi.requester.Requester
) – The requester to pass HTTP requests through. - attributes (dict) – The JSON object to build this object with.
-
associated_course_migration
(**kwargs)¶ Start a migration to update content in all associated courses.
Calls: POST /api/v1/courses/:course_id/blueprint_templates/:template_id/migrations Return type: canvasapi.blueprint.BlueprintMigration
-
change_blueprint_restrictions
(content_type, content_id, restricted, **kwargs)¶ Set or remove restrictions on a blueprint course object. Must have all three parameters for this function call to work.
Calls: PUT /api/v1/courses/:course_id/blueprint_templates/:template_id/restrict_item
Parameters: - content_type (str) – type of object
- content_id (int) – id of the object
- restricted (bool) – whether it’s restricted or not
Returns: True if the restriction was succesfully applied.
Return type: bool
-
get_associated_courses
(**kwargs)¶ Return a list of courses associated with the given blueprint.
Calls: GET /api/v1/courses/:course_id/blueprint_templates/:template_id/ associated_courses Return type: canvasapi.paginated_list.PaginatedList
ofcanvasapi.course.Course
-
get_unsynced_changes
(**kwargs)¶ Return changes made to associated courses of a blueprint course.
Calls: GET /api/v1/courses/:course_id/blueprint_templates/:template_id/unsynced_changes Return type: canvasapi.paginated_list.PaginatedList
ofcanvasapi.blueprint.ChangeRecord
-
list_blueprint_migrations
(**kwargs)¶ Return a paginated list of migrations for the template.
Calls: GET api/v1/courses/:course_id/blueprint_templates/:template_id/migrations Return type: canvasapi.paginated_list.PaginatedList
ofcanvasapi.blueprint.BlueprintMigration
-
show_blueprint_migration
(migration, **kwargs)¶ Return the status of a blueprint migration.
Calls: GET /api/v1/courses/:course_id/blueprint_templates/:template_id /migrations/:id Parameters: migration (int or canvasapi.blueprint.BlueprintMigration
) – migration id or objectReturn type: canvasapi.blueprint.BlueprintMigration
-
update_associated_courses
(**kwargs)¶ Add or remove new associations for the blueprint template.
Calls: PUT /api/v1/courses/:course_id/blueprint_templates/:template_id/update_associations Returns: True if the course was added or removed, False otherwise. Return type: bool
- requester (
ChangeRecord¶
-
class
canvasapi.blueprint.
ChangeRecord
(requester, attributes)¶ Parameters: - requester (
canvasapi.requester.Requester
) – The requester to pass HTTP requests through. - attributes (dict) – The JSON object to build this object with.
- requester (