forked from instructure/pandarus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgroup_categories.json
508 lines (507 loc) · 18.9 KB
/
group_categories.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
{
"apiVersion": "1.0",
"swaggerVersion": "1.2",
"basePath": "https://canvas.instructure.com/api",
"resourcePath": "/group_categories",
"produces": [
"application/json"
],
"apis": [
{
"path": "/v1/accounts/{account_id}/group_categories",
"description": "Returns a paginated list of group categories in a context",
"operations": [
{
"method": "GET",
"summary": "List group categories for a context",
"notes": "Returns a paginated list of group categories in a context",
"nickname": "list_group_categories_for_context_accounts",
"parameters": [
{
"paramType": "path",
"name": "account_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "array",
"items": {
"$ref": "GroupCategory"
}
}
]
},
{
"path": "/v1/courses/{course_id}/group_categories",
"description": "Returns a paginated list of group categories in a context",
"operations": [
{
"method": "GET",
"summary": "List group categories for a context",
"notes": "Returns a paginated list of group categories in a context",
"nickname": "list_group_categories_for_context_courses",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "array",
"items": {
"$ref": "GroupCategory"
}
}
]
},
{
"path": "/v1/group_categories/{group_category_id}",
"description": "Returns the data for a single group category, or a 401 if the caller doesn't have\nthe rights to see it.",
"operations": [
{
"method": "GET",
"summary": "Get a single group category",
"notes": "Returns the data for a single group category, or a 401 if the caller doesn't have\nthe rights to see it.",
"nickname": "get_single_group_category",
"parameters": [
{
"paramType": "path",
"name": "group_category_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "GroupCategory"
}
]
},
{
"path": "/v1/accounts/{account_id}/group_categories",
"description": "Create a new group category",
"operations": [
{
"method": "POST",
"summary": "Create a Group Category",
"notes": "Create a new group category",
"nickname": "create_group_category_accounts",
"parameters": [
{
"paramType": "path",
"name": "account_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "name",
"description": "Name of the group category",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "self_signup",
"description": "Allow students to sign up for a group themselves (Course Only).\nvalid values are:\n\"enabled\":: allows students to self sign up for any group in course\n\"restricted\":: allows students to self sign up only for groups in the\n same section null disallows self sign up",
"type": "string",
"format": null,
"required": false,
"enum": [
"enabled",
"restricted"
]
},
{
"paramType": "form",
"name": "auto_leader",
"description": "Assigns group leaders automatically when generating and allocating students to groups\nValid values are:\n\"first\":: the first student to be allocated to a group is the leader\n\"random\":: a random student from all members is chosen as the leader",
"type": "string",
"format": null,
"required": false,
"enum": [
"first",
"random"
]
},
{
"paramType": "form",
"name": "group_limit",
"description": "Limit the maximum number of users in each group (Course Only). Requires\nself signup.",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "form",
"name": "create_group_count",
"description": "Create this number of groups (Course Only).",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "form",
"name": "split_group_count",
"description": "(Deprecated)\nCreate this number of groups, and evenly distribute students\namong them. not allowed with \"enable_self_signup\". because\nthe group assignment happens synchronously, it's recommended\nthat you instead use the assign_unassigned_members endpoint.\n(Course Only)",
"type": "string",
"format": null,
"required": false
}
],
"type": "GroupCategory"
}
]
},
{
"path": "/v1/courses/{course_id}/group_categories",
"description": "Create a new group category",
"operations": [
{
"method": "POST",
"summary": "Create a Group Category",
"notes": "Create a new group category",
"nickname": "create_group_category_courses",
"parameters": [
{
"paramType": "path",
"name": "course_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "name",
"description": "Name of the group category",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "self_signup",
"description": "Allow students to sign up for a group themselves (Course Only).\nvalid values are:\n\"enabled\":: allows students to self sign up for any group in course\n\"restricted\":: allows students to self sign up only for groups in the\n same section null disallows self sign up",
"type": "string",
"format": null,
"required": false,
"enum": [
"enabled",
"restricted"
]
},
{
"paramType": "form",
"name": "auto_leader",
"description": "Assigns group leaders automatically when generating and allocating students to groups\nValid values are:\n\"first\":: the first student to be allocated to a group is the leader\n\"random\":: a random student from all members is chosen as the leader",
"type": "string",
"format": null,
"required": false,
"enum": [
"first",
"random"
]
},
{
"paramType": "form",
"name": "group_limit",
"description": "Limit the maximum number of users in each group (Course Only). Requires\nself signup.",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "form",
"name": "create_group_count",
"description": "Create this number of groups (Course Only).",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "form",
"name": "split_group_count",
"description": "(Deprecated)\nCreate this number of groups, and evenly distribute students\namong them. not allowed with \"enable_self_signup\". because\nthe group assignment happens synchronously, it's recommended\nthat you instead use the assign_unassigned_members endpoint.\n(Course Only)",
"type": "string",
"format": null,
"required": false
}
],
"type": "GroupCategory"
}
]
},
{
"path": "/v1/group_categories/{group_category_id}",
"description": "Modifies an existing group category.",
"operations": [
{
"method": "PUT",
"summary": "Update a Group Category",
"notes": "Modifies an existing group category.",
"nickname": "update_group_category",
"parameters": [
{
"paramType": "path",
"name": "group_category_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "name",
"description": "Name of the group category",
"type": "string",
"format": null,
"required": false
},
{
"paramType": "form",
"name": "self_signup",
"description": "Allow students to sign up for a group themselves (Course Only).\nValid values are:\n\"enabled\":: allows students to self sign up for any group in course\n\"restricted\":: allows students to self sign up only for groups in the\n same section null disallows self sign up",
"type": "string",
"format": null,
"required": false,
"enum": [
"enabled",
"restricted"
]
},
{
"paramType": "form",
"name": "auto_leader",
"description": "Assigns group leaders automatically when generating and allocating students to groups\nValid values are:\n\"first\":: the first student to be allocated to a group is the leader\n\"random\":: a random student from all members is chosen as the leader",
"type": "string",
"format": null,
"required": false,
"enum": [
"first",
"random"
]
},
{
"paramType": "form",
"name": "group_limit",
"description": "Limit the maximum number of users in each group (Course Only). Requires\nself signup.",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "form",
"name": "create_group_count",
"description": "Create this number of groups (Course Only).",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "form",
"name": "split_group_count",
"description": "(Deprecated)\nCreate this number of groups, and evenly distribute students\namong them. not allowed with \"enable_self_signup\". because\nthe group assignment happens synchronously, it's recommended\nthat you instead use the assign_unassigned_members endpoint.\n(Course Only)",
"type": "string",
"format": null,
"required": false
}
],
"type": "GroupCategory"
}
]
},
{
"path": "/v1/group_categories/{group_category_id}",
"description": "Deletes a group category and all groups under it. Protected group\ncategories can not be deleted, i.e. \"communities\" and \"student_organized\".",
"operations": [
{
"method": "DELETE",
"summary": "Delete a Group Category",
"notes": "Deletes a group category and all groups under it. Protected group\ncategories can not be deleted, i.e. \"communities\" and \"student_organized\".",
"nickname": "delete_group_category",
"parameters": [
{
"paramType": "path",
"name": "group_category_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "void"
}
]
},
{
"path": "/v1/group_categories/{group_category_id}/groups",
"description": "Returns a paginated list of groups in a group category",
"operations": [
{
"method": "GET",
"summary": "List groups in group category",
"notes": "Returns a paginated list of groups in a group category",
"nickname": "list_groups_in_group_category",
"parameters": [
{
"paramType": "path",
"name": "group_category_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "array",
"items": {
"$ref": "Group"
}
}
]
},
{
"path": "/v1/group_categories/{group_category_id}/users",
"description": "Returns a paginated list of users in the group category.",
"operations": [
{
"method": "GET",
"summary": "List users in group category",
"notes": "Returns a paginated list of users in the group category.",
"nickname": "list_users_in_group_category",
"parameters": [
{
"paramType": "path",
"name": "group_category_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "query",
"name": "search_term",
"description": "The partial name or full ID of the users to match and return in the results\nlist. Must be at least 3 characters.",
"type": "string",
"format": null,
"required": false
},
{
"paramType": "query",
"name": "unassigned",
"description": "Set this value to true if you wish only to search unassigned users in the\ngroup category.",
"type": "boolean",
"format": null,
"required": false
}
],
"type": "array",
"items": {
"$ref": "User"
}
}
]
},
{
"path": "/v1/group_categories/{group_category_id}/assign_unassigned_members",
"description": "Assign all unassigned members as evenly as possible among the existing\nstudent groups.",
"operations": [
{
"method": "POST",
"summary": "Assign unassigned members",
"notes": "Assign all unassigned members as evenly as possible among the existing\nstudent groups.",
"nickname": "assign_unassigned_members",
"parameters": [
{
"paramType": "path",
"name": "group_category_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "sync",
"description": "The assigning is done asynchronously by default. If you would like to\noverride this and have the assigning done synchronously, set this value\nto true.",
"type": "boolean",
"format": null,
"required": false
}
],
"type": "GroupMembership | Progress"
}
]
}
],
"models": {
"GroupCategory": {
"id": "GroupCategory",
"description": "",
"required": [
],
"properties": {
"id": {
"description": "The ID of the group category.",
"example": 17,
"type": "integer"
},
"name": {
"description": "The display name of the group category.",
"example": "Math Groups",
"type": "string"
},
"role": {
"description": "Certain types of group categories have special role designations. Currently, these include: 'communities', 'student_organized', and 'imported'. Regular course/account group categories have a role of null.",
"example": "communities",
"type": "string"
},
"self_signup": {
"description": "If the group category allows users to join a group themselves, thought they may only be a member of one group per group category at a time. Values include 'restricted', 'enabled', and null 'enabled' allows students to assign themselves to a group 'restricted' restricts them to only joining a group in their section null disallows students from joining groups",
"type": "string",
"allowableValues": {
"values": [
"restricted",
"enabled"
]
}
},
"auto_leader": {
"description": "Gives instructors the ability to automatically have group leaders assigned. Values include 'random', 'first', and null; 'random' picks a student from the group at random as the leader, 'first' sets the first student to be assigned to the group as the leader",
"type": "string",
"allowableValues": {
"values": [
"first",
"random"
]
}
},
"context_type": {
"description": "The course or account that the category group belongs to. The pattern here is that whatever the context_type is, there will be an _id field named after that type. So if instead context_type was 'Course', the course_id field would be replaced by an course_id field.",
"example": "Account",
"type": "string"
},
"account_id": {
"example": 3,
"type": "integer"
},
"group_limit": {
"description": "If self-signup is enabled, group_limit can be set to cap the number of users in each group. If null, there is no limit.",
"type": "integer"
},
"progress": {
"description": "If the group category has not yet finished a randomly student assignment request, a progress object will be attached, which will contain information related to the progress of the assignment request. Refer to the Progress API for more information",
"$ref": "Progress"
}
}
}
}
}