-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathblueprint_courses.json
722 lines (717 loc) · 25.4 KB
/
blueprint_courses.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
{
"apiVersion": "1.0",
"swaggerVersion": "1.2",
"basePath": "https://canvas.instructure.com/api",
"resourcePath": "/blueprint_courses",
"produces": [
"application/json"
],
"apis": [
{
"path": "/v1/courses/{course_id}/blueprint_templates/{template_id}",
"description": "Using 'default' as the template_id should suffice for the current implmentation (as there should be only one template per course).\nHowever, using specific template ids may become necessary in the future",
"operations": [
{
"method": "GET",
"summary": "Get blueprint information",
"notes": "Using 'default' as the template_id should suffice for the current implmentation (as there should be only one template per course).\nHowever, using specific template ids may become necessary in the future",
"nickname": "get_blueprint_information",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "template_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "BlueprintTemplate"
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_templates/{template_id}/associated_courses",
"description": "Returns a list of courses that are configured to receive updates from this blueprint",
"operations": [
{
"method": "GET",
"summary": "Get associated course information",
"notes": "Returns a list of courses that are configured to receive updates from this blueprint",
"nickname": "get_associated_course_information",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "template_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "array",
"items": {
"$ref": "Course"
}
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_templates/{template_id}/update_associations",
"description": "Send a list of course ids to add or remove new associations for the template.\nCannot add courses that do not belong to the blueprint course's account. Also cannot add\nother blueprint courses or courses that already have an association with another blueprint course.",
"operations": [
{
"method": "PUT",
"summary": "Update associated courses",
"notes": "Send a list of course ids to add or remove new associations for the template.\nCannot add courses that do not belong to the blueprint course's account. Also cannot add\nother blueprint courses or courses that already have an association with another blueprint course.",
"nickname": "update_associated_courses",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "template_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "course_ids_to_add",
"description": "Courses to add as associated courses",
"type": "Array",
"format": null,
"required": false
},
{
"paramType": "form",
"name": "course_ids_to_remove",
"description": "Courses to remove as associated courses",
"type": "Array",
"format": null,
"required": false
}
],
"type": "void"
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations",
"description": "Begins a migration to push recently updated content to all associated courses.\nOnly one migration can be running at a time.",
"operations": [
{
"method": "POST",
"summary": "Begin a migration to push to associated courses",
"notes": "Begins a migration to push recently updated content to all associated courses.\nOnly one migration can be running at a time.",
"nickname": "begin_migration_to_push_to_associated_courses",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "template_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "comment",
"description": "An optional comment to be included in the sync history.",
"type": "string",
"format": null,
"required": false
},
{
"paramType": "form",
"name": "send_notification",
"description": "Send a notification to the calling user when the sync completes.",
"type": "boolean",
"format": null,
"required": false
},
{
"paramType": "form",
"name": "copy_settings",
"description": "Whether course settings should be copied over to associated courses.\nDefaults to true for newly associated courses.",
"type": "boolean",
"format": null,
"required": false
}
],
"type": "BlueprintMigration"
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_templates/{template_id}/restrict_item",
"description": "If a blueprint course object is restricted, editing will be limited for copies in associated courses.",
"operations": [
{
"method": "PUT",
"summary": "Set or remove restrictions on a blueprint course object",
"notes": "If a blueprint course object is restricted, editing will be limited for copies in associated courses.",
"nickname": "set_or_remove_restrictions_on_blueprint_course_object",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "template_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "content_type",
"description": "The type of the object.",
"type": "string",
"format": null,
"required": false,
"enum": [
"assignment",
"attachment",
"discussion_topic",
"external_tool",
"quiz",
"wiki_page"
]
},
{
"paramType": "form",
"name": "content_id",
"description": "The ID of the object.",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "form",
"name": "restricted",
"description": "Whether to apply restrictions.",
"type": "boolean",
"format": null,
"required": false
},
{
"paramType": "form",
"name": "restrictions",
"description": "(Optional) If the object is restricted, this specifies a set of restrictions. If not specified,\nthe course-level restrictions will be used. See {api:CoursesController#update Course API update documentation}",
"type": "BlueprintRestriction",
"format": null,
"required": false
}
],
"type": "void"
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_templates/{template_id}/unsynced_changes",
"description": "Retrieve a list of learning objects that have changed since the last blueprint sync operation.",
"operations": [
{
"method": "GET",
"summary": "Get unsynced changes",
"notes": "Retrieve a list of learning objects that have changed since the last blueprint sync operation.",
"nickname": "get_unsynced_changes",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "template_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "array",
"items": {
"$ref": "ChangeRecord"
}
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations",
"description": "Shows a paginated list of migrations for the template, starting with the most recent. This endpoint can be called on a\nblueprint course. See also {api:MasterCourses::MasterTemplatesController#imports_index the associated course side}.",
"operations": [
{
"method": "GET",
"summary": "List blueprint migrations",
"notes": "Shows a paginated list of migrations for the template, starting with the most recent. This endpoint can be called on a\nblueprint course. See also {api:MasterCourses::MasterTemplatesController#imports_index the associated course side}.",
"nickname": "list_blueprint_migrations",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "template_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "array",
"items": {
"$ref": "BlueprintMigration"
}
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations/{id}",
"description": "Shows the status of a migration. This endpoint can be called on a blueprint course. See also\n{api:MasterCourses::MasterTemplatesController#imports_show the associated course side}.",
"operations": [
{
"method": "GET",
"summary": "Show a blueprint migration",
"notes": "Shows the status of a migration. This endpoint can be called on a blueprint course. See also\n{api:MasterCourses::MasterTemplatesController#imports_show the associated course side}.",
"nickname": "show_blueprint_migration",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "template_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "BlueprintMigration"
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations/{id}/details",
"description": "Show the changes that were propagated in a blueprint migration. This endpoint can be called on a\nblueprint course. See also {api:MasterCourses::MasterTemplatesController#import_details the associated course side}.",
"operations": [
{
"method": "GET",
"summary": "Get migration details",
"notes": "Show the changes that were propagated in a blueprint migration. This endpoint can be called on a\nblueprint course. See also {api:MasterCourses::MasterTemplatesController#import_details the associated course side}.",
"nickname": "get_migration_details",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "template_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "array",
"items": {
"$ref": "ChangeRecord"
}
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_subscriptions/{subscription_id}/migrations",
"description": "Shows a paginated list of migrations imported into a course associated with a blueprint, starting with the most recent. See also\n{api:MasterCourses::MasterTemplatesController#migrations_index the blueprint course side}.\n\nUse 'default' as the subscription_id to use the currently active blueprint subscription.",
"operations": [
{
"method": "GET",
"summary": "List blueprint imports",
"notes": "Shows a paginated list of migrations imported into a course associated with a blueprint, starting with the most recent. See also\n{api:MasterCourses::MasterTemplatesController#migrations_index the blueprint course side}.\n\nUse 'default' as the subscription_id to use the currently active blueprint subscription.",
"nickname": "list_blueprint_imports",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "subscription_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "array",
"items": {
"$ref": "BlueprintMigration"
}
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_subscriptions/{subscription_id}/migrations/{id}",
"description": "Shows the status of an import into a course associated with a blueprint. See also\n{api:MasterCourses::MasterTemplatesController#migrations_show the blueprint course side}.",
"operations": [
{
"method": "GET",
"summary": "Show a blueprint import",
"notes": "Shows the status of an import into a course associated with a blueprint. See also\n{api:MasterCourses::MasterTemplatesController#migrations_show the blueprint course side}.",
"nickname": "show_blueprint_import",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "subscription_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "BlueprintMigration"
}
]
},
{
"path": "/v1/courses/{course_id}/blueprint_subscriptions/{subscription_id}/migrations/{id}/details",
"description": "Show the changes that were propagated to a course associated with a blueprint. See also\n{api:MasterCourses::MasterTemplatesController#migration_details the blueprint course side}.",
"operations": [
{
"method": "GET",
"summary": "Get import details",
"notes": "Show the changes that were propagated to a course associated with a blueprint. See also\n{api:MasterCourses::MasterTemplatesController#migration_details the blueprint course side}.",
"nickname": "get_import_details",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "subscription_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "array",
"items": {
"$ref": "ChangeRecord"
}
}
]
}
],
"models": {
"BlueprintTemplate": {
"id": "BlueprintTemplate",
"description": "",
"required": [
],
"properties": {
"id": {
"description": "The ID of the template.",
"example": 1,
"type": "integer",
"format": "int64"
},
"course_id": {
"description": "The ID of the Course the template belongs to.",
"example": 2,
"type": "integer",
"format": "int64"
},
"last_export_completed_at": {
"description": "Time when the last export was completed",
"example": "2013-08-28T23:59:00-06:00",
"type": "datetime"
},
"associated_course_count": {
"description": "Number of associated courses for the template",
"example": 3,
"type": "integer"
},
"latest_migration": {
"description": "Details of the latest migration",
"type": "BlueprintMigration"
}
}
},
"BlueprintMigration": {
"id": "BlueprintMigration",
"description": "",
"required": [
],
"properties": {
"id": {
"description": "The ID of the migration.",
"example": 1,
"type": "integer",
"format": "int64"
},
"template_id": {
"description": "The ID of the template the migration belongs to. Only present when querying a blueprint course.",
"example": 2,
"type": "integer",
"format": "int64"
},
"subscription_id": {
"description": "The ID of the associated course's blueprint subscription. Only present when querying a course associated with a blueprint.",
"example": 101,
"type": "integer",
"format": "int64"
},
"user_id": {
"description": "The ID of the user who queued the migration.",
"example": 3,
"type": "integer",
"format": "int64"
},
"workflow_state": {
"description": "Current state of the content migration: queued, exporting, imports_queued, completed, exports_failed, imports_failed",
"example": "running",
"type": "string"
},
"created_at": {
"description": "Time when the migration was queued",
"example": "2013-08-28T23:59:00-06:00",
"type": "datetime"
},
"exports_started_at": {
"description": "Time when the exports begun",
"example": "2013-08-28T23:59:00-06:00",
"type": "datetime"
},
"imports_queued_at": {
"description": "Time when the exports were completed and imports were queued",
"example": "2013-08-28T23:59:00-06:00",
"type": "datetime"
},
"imports_completed_at": {
"description": "Time when the imports were completed",
"example": "2013-08-28T23:59:00-06:00",
"type": "datetime"
},
"comment": {
"description": "User-specified comment describing changes made in this operation",
"example": "Fixed spelling in question 3 of midterm exam",
"type": "string"
}
}
},
"BlueprintRestriction": {
"id": "BlueprintRestriction",
"description": "A set of restrictions on editing for copied objects in associated courses",
"required": [
],
"properties": {
"content": {
"description": "Restriction on main content (e.g. title, description).",
"example": true,
"type": "boolean"
},
"points": {
"description": "Restriction on points possible for assignments and graded learning objects",
"example": true,
"type": "boolean"
},
"due_dates": {
"description": "Restriction on due dates for assignments and graded learning objects",
"example": false,
"type": "boolean"
},
"availability_dates": {
"description": "Restriction on availability dates for an object",
"example": true,
"type": "boolean"
}
}
},
"ChangeRecord": {
"id": "ChangeRecord",
"description": "Describes a learning object change propagated to associated courses from a blueprint course",
"required": [
],
"properties": {
"asset_id": {
"description": "The ID of the learning object that was changed in the blueprint course.",
"example": 2,
"type": "integer",
"format": "int64"
},
"asset_type": {
"description": "The type of the learning object that was changed in the blueprint course. One of 'assignment', 'attachment', 'discussion_topic', 'external_tool', 'quiz', or 'wiki_page'.",
"example": "assignment",
"type": "string"
},
"asset_name": {
"description": "The name of the learning object that was changed in the blueprint course.",
"example": "Some Assignment",
"type": "string"
},
"change_type": {
"description": "The type of change; one of 'created', 'updated', 'deleted'",
"example": "created",
"type": "string"
},
"html_url": {
"description": "The URL of the changed object",
"example": "https://canvas.example.com/courses/101/assignments/2",
"type": "string"
},
"locked": {
"description": "Whether the object is locked in the blueprint",
"example": false,
"type": "boolean"
},
"exceptions": {
"description": "A list of ExceptionRecords for linked courses that did not receive this update.",
"example": [
{
"course_id": 101,
"conflicting_changes": [
"points"
]
}
],
"type": "array",
"items": {
"type": "object"
}
}
}
},
"ExceptionRecord": {
"id": "ExceptionRecord",
"description": "Lists associated courses that did not receive a change propagated from a blueprint",
"required": [
],
"properties": {
"course_id": {
"description": "The ID of the associated course",
"example": 101,
"type": "integer",
"format": "int64"
},
"conflicting_changes": {
"description": "A list of change classes in the associated course's copy of the item that prevented a blueprint change from being applied. One or more of ['content', 'points', 'due_dates', 'availability_dates'].",
"example": [
"points"
],
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}