-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintersis.yaml.orig
1247 lines (1208 loc) · 31.3 KB
/
intersis.yaml.orig
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
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
swagger: '2.0'
################################################################################
# API Information #
################################################################################
info:
version: v0.7
title: Intersis API
description: |
Description of the InterSIS API
This description can cover multiple lines.
```
And you can put Markdown in here!
```
################################################################################
# Host, Base Path, Schemes and Content Types #
################################################################################
basePath: /v0.7
schemes:
- https
produces:
- application/json
consumes:
- application/json
################################################################################
# Security #
################################################################################
securityDefinitions:
oauth:
type: oauth2
flow: implicit
authorizationUrl: /o/authorize/?redirect_uri=CALLBACK_URI&scope=SCOPES&state=STATE&client_id=CLIENT_ID
scopes:
read-write: to read/modify/create any resources on a user's behalf.
read: to read any resources on a user's behalf.
read-rostering: |
to read the the user's course names, course descriptions, and section rosters,
not including student names or demographic information.
read-student-names: read any student names or profile names on the user's behalf
read-student-profile-names: read any student names on the user's behalf
read-client: read user details about the client
key:
type: apiKey
in: query
name: access_token
security:
- oauth:
- read-write
- read
- read-rostering
- read-student-names
- read-student-profile-names
- read-client
- key: []
################################################################################
# Parameters #
################################################################################
parameters:
id:
name: id
in: path
description: The resource identification string
type: string
required: true
staffId:
name: staffId
in: path
description: Staff resource identification string
required: true
type: string
siteId:
name: siteId
in: path
description: Site resource identification string
required: true
type: string
sectionId:
name: sectionId
in: path
description: Section resource identification string
required: true
type: string
################################################################################
# Paths #
################################################################################
paths:
/clients:
post:
operationId: registerClient
summary: Register an OAuth client
description: Registers your OAuth client with the InterSIS instance.
tags:
- clients
parameters:
- in: formData
name: redirect_uris
description: Allowed URIs list, space separated
required: true
type: string
- in: formData
name: name
description: A unique name for your client
required: true
type: string
responses:
200:
description: OK - The client object
schema:
$ref: '#/definitions/Client'
<<<<<<< HEAD
/courses:
get:
security:
- oauth:
- read-rostering
tags:
- courses
description: List all course objects available to you.
responses:
"200":
description: successful operation
schema:
type: array
items:
$ref: "#/definitions/Course"
post:
operationId: addCourse
description: Create a course object.
parameters:
- in: formData
name: name
description: The name of the course
required: true
type: string
- in: formData
name: short_description
description: The guardians given name(s)
required: true
type: string
- in: formData
name: long_description
description: The guardian's email address
required: true
type: string
security:
- oauth:
- read-write
tags:
- courses
responses:
200:
description: The course object
schema:
$ref: '#/definitions/Course'
/courses/{id}:
parameters:
- $ref: '#/parameters/id'
get:
security:
- oauth:
- read-rostering
tags:
- courses
description: Get basic information about a course.
responses:
200:
description: OK
schema:
$ref: '#/definitions/Course'
patch:
operationId: updateCourse
description: Update a course object.
parameters:
- in: formData
name: name
description: The name of the course
required: false
type: string
- in: formData
name: short_description
description: The guardians given name(s)
required: false
type: string
- in: formData
name: long_description
description: The guardian's email address
required: false
type: string
security:
- oauth:
- read-write
tags:
- courses
responses:
200:
description: The guardian object
schema:
$ref: '#/definitions/Guardian'
delete:
tags:
- courses
summary: Deletes a course
description: ""
operationId: deleteCourse
parameters:
- $ref: '#/parameters/id'
responses:
"204":
description: Course deleted
schema:
type: array
items:
$ref: "#/definitions/Course"
security:
- oauth:
- read-write
=======
>>>>>>> Big ol' formatting / standardizing update. Standard: operationID; tags; summary; description; security; parameters; response. Standard: summary is speaking DB (objects/associations) and description is speaking human (assign, remove, person). Standard: lowest-permissible security setting. Standard: error-handling included in spec.
/guardians:
get:
operationId: listGuardians
tags:
- guardians
summary: List Guardian objects
description: Lists all Guardian objects available to you.
security:
- oauth:
- read-write
- read
responses:
200:
description: OK - List of guardians
schema:
type: array
items:
$ref: "#/definitions/Guardian"
204:
description: No Content - No guardians available
post:
operationId: addGuardian
tags:
- guardians
summary: Create guardian
description: Create a guardian object.
security:
- oauth:
- read-write
parameters:
- in: formData
name: family_names
description: The guardian's family name(s)
required: true
type: string
- in: formData
name: given_names
description: The guardians given name(s)
required: true
type: string
- in: formData
name: email
description: The guardian's email address
required: false
type: string
- in: formData
name: hispanic_ethnicity
description: The guardian's hispanic ethnicity
required: false
type: boolean
- in: formData
name: sex
description: The guardian's sex
required: false
type: string
enum:
- female
- male
- in: formData
name: race
description: The guardian's race
required: false
type: string
responses:
201:
description: Successfully created - The guardian object
schema:
$ref: '#/definitions/Guardian'
409:
description: Cannot create - Guardian already exists.
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/guardians/{id}:
parameters:
- $ref: '#/parameters/id'
get:
operationId: detailGuardian
tags:
- guardians
summary: Guardian detail
description: Get basic information about a guardian.
security:
- oauth:
- read
responses:
200:
description: OK - The guardian object
schema:
$ref: '#/definitions/Guardian'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
patch:
operationId: updateGuardian
tags:
- guardians
summary: Update guardian
description: Update information about a guardian object.
security:
- oauth:
- read-write
parameters:
- in: formData
name: family_names
description: The guardian's family name(s)
required: false
type: string
- in: formData
name: given_names
description: The guardians given name(s)
required: false
type: string
- in: formData
name: email
description: The guardian's email address
required: false
type: string
- in: formData
name: hispanic_ethnicity
description: The guardian's hispanic ethnicity
required: false
type: boolean
- in: formData
name: sex
description: The guardian's sex
required: false
type: string
enum:
- female
- male
- in: formData
name: race
description: The guardian's race
required: false
type: string
responses:
200:
description: OK - The guardian object
schema:
$ref: '#/definitions/Guardian'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
delete:
operationId: deleteGuardian
tags:
- guardians
summary: Delete guardian
description: Deletes a guardian object.
operationId: deleteGuardian
security:
- oauth:
- read-write
parameters:
- $ref: '#/parameters/id'
responses:
200:
description: OK - Successfully deleted - List remaining guardians.
schema:
type: array
items:
$ref: "#/definitions/Guardian"
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/staff:
get:
tags:
- staff
operationId: listStaff
summary: List staff objects
description: List all staff objects available to you.
security:
- oauth:
- read-rostering
responses:
200:
description: OK - List of staff objects
schema:
type: array
items:
$ref: '#/definitions/Staff'
204:
description: No Content - No staff objects available
post:
operationId: addStaff
tags:
- staff
summary: Create staff
description: Create a new staff object.
security:
- oauth:
- read-write
parameters:
- in: formData
name: role
type: string
required: true
description: The staff member's role in the organization.
- in: formData
name: family_names
description: The staff member's family name(s)
required: true
type: string
- in: formData
name: given_names
description: The staff member's given name(s)
required: true
type: string
- in: formData
name: email
description: The staff member's email address
required: false
type: string
- in: formData
name: hispanic_ethnicity
description: The staff member's hispanic ethnicity
required: false
type: boolean
- in: formData
name: sex
description: The staff member's sex
required: false
type: string
enum:
- female
- male
- in: formData
name: race
description: The staff member's race
required: false
type: string
responses:
201:
description: Successfully created - The staff object
schema:
$ref: '#/definitions/Staff'
409:
description: Cannot create - staff object already exists
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/staff/{id}:
parameters:
- $ref: '#/parameters/id'
get:
operationId: detailStaff
tags:
- staff
summary: Staff detail
description: Get detailed information about a staff member.
security:
- oauth:
- read
responses:
200:
description: OK - Staff details
schema:
$ref: '#/definitions/Staff'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
patch:
operationId: updateStaff
tags:
- staff
summary: Update staff object
description: Update details about a staff object.
security:
- oauth:
- read-write
parameters:
- in: formData
name: family_names
description: The staff member's family name(s)
required: false
type: string
- in: formData
name: given_names
description: The staff member' given name(s)
required: false
type: string
- in: formData
name: email
description: The staff member's email address
required: false
type: string
- in: formData
name: hispanic_ethnicity
description: The staff member's hispanic ethnicity
required: false
type: boolean
- in: formData
name: sex
description: The staff member's sex
required: false
type: string
enum:
- female
- male
- in: formData
name: race
description: The staff member's race
required: false
type: string
responses:
200:
description: OK - The staff object
schema:
$ref: '#/definitions/Staff'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
delete:
operationId: deleteStaff
tags:
- staff
summary: Deletes a staff member
description: Deletes a staff object.
operationId: deleteStaff
security:
- oauth:
- read-write
responses:
200:
description: Successfully deleted - list remaining staff
schema:
type: array
items:
$ref: '#/definitions/Staff'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/staff/{staffId}/sections/{sectionId}:
parameters:
- $ref: '#/parameters/staffId'
- $ref: '#/parameters/sectionId'
put:
operationId: staffAddSection
tags:
- staff
summary: Associates Section with Staff
description: Assigns a course section to the staff member
security:
- oauth:
- read-write
responses:
201:
description: Successfully associated - The staff object
schema:
$ref: '#/definitions/Staff'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
delete:
operationId: staffRemoveSection
tags:
- staff
summary: Disassociate Section from Staff
description: Removes a course section from the staff member
security:
- oauth:
- read-write
responses:
200:
description: Successfully removed - The staff object
schema:
$ref: '#/definitions/Staff'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/staff/{staffId}/sites/{siteId}:
parameters:
- $ref: '#/parameters/staffId'
- $ref: '#/parameters/siteId'
put:
operationId: staffAddSite
tags:
- staff
summary: Associates Site to Staff
description: Associates a site with the staff member
security:
- oauth:
- read-write
responses:
201:
description: Successfully associated - the staff object
schema:
$ref: '#/definitions/Staff'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
delete:
operationId: staffRemoveSite
tags:
- staff
summary: Disassociate Site from Staff
description: Removes a site from the staff member's sites.
security:
- oauth:
- read-write
responses:
200:
description: Successfully removed - The staff object
schema:
$ref: '#/definitions/Staff'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/students:
get:
operationId: listStudents
tags:
- students
summary: List student objects
description: List all students available to you.
security:
- oauth:
- read-rostering
responses:
200:
description: OK - Student objects
schema:
type: array
items:
$ref: '#/definitions/Student'
post:
operationId: addStudent
tags:
- students
summary: Create student object
description: Create a new student.
security:
- oauth:
- read-write
parameters:
- in: formData
name: family_names
description: The student's family name(s)
required: false
type: string
- in: formData
name: given_names
description: The student's given name(s)
required: false
type: string
- in: formData
name: email
description: The student's email address
required: false
type: string
- in: formData
name: hispanic_ethnicity
description: The student's hispanic ethnicity
required: false
type: boolean
- in: formData
name: sex
description: The student's sex
required: false
type: string
enum:
- female
- male
- in: formData
name: race
description: The student's race
required: false
type: string
responses:
201:
description: Successfully created - The student object
schema:
$ref: '#/definitions/Student'
409:
description: Conflict - Student object already exists
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/students/{id}:
parameters:
- $ref: '#/parameters/id'
get:
operationId: detailStudent
tags:
- students
summary: Student Detail information
description: Get detailed information about a student.
security:
- oauth:
- read
responses:
200:
description: OK - The Student object
schema:
$ref: '#/definitions/Student'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
patch:
operationId: updateStudent
tags:
- students
summary: Update student object
description: Update deatils about a student.
security:
- oauth:
- read-write
parameters:
- in: formData
name: family_names
description: The student's family name(s)
required: false
type: string
- in: formData
name: given_names
description: The student's given name(s)
required: false
type: string
- in: formData
name: email
description: The student's email address
required: false
type: string
- in: formData
name: hispanic_ethnicity
description: The student's hispanic ethnicity
required: false
type: boolean
- in: formData
name: sex
description: The student's sex
required: false
type: string
enum:
- female
- male
- in: formData
name: race
description: The student's race
required: false
type: string
responses:
200:
description: Successfully updated - The student object
schema:
$ref: '#/definitions/Student'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
delete:
operationId: deleteStudent
tags:
- students
summary: Delete Student object
description: Deletes a student.
security:
- oauth:
- read-write
responses:
200:
description: Successfully deleted - List of remaining student objects
schema:
type: array
items:
$ref: '#/definitions/Student'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/users:
get:
operationId: identifyUser
tags:
- users
summary: Get user_id for token
description: Get the user ID associated with a provided token.
security:
- oauth:
- read-client
responses:
200:
description: OK - User details
schema:
properties:
id:
type: string
/users/{id}/email:
parameters:
- $ref: '#/parameters/id'
patch:
operationId: updateUserEmail
tags:
- users
summary: Change User email.
description: Change the email address associated with a given user.
security:
- oauth:
- read-write
parameters:
- in: formData
name: email
required: true
type: string
- in: formData
name: password
required: false
type: string
responses:
200:
description: OK - the User object
schema:
$ref: '#/definitions/User'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
delete:
operationId: removeUserEmail
tags:
- users
summary: Remove User email
description: Remove the email address for a given user.
security:
- oauth:
- read-write
responses:
200:
description: User email removed - the User object
schema:
$ref: '#/definitions/User'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/users/{id}/password:
parameters:
- $ref: '#/parameters/id'
patch:
operationId: updateUserPassword
tags:
- users
summary: Change User password
description: Change the password for a given user.
security:
- oauth:
- read-write
parameters:
- in: formData
name: password
required: false
type: string
- in: formData
name: new_password
required: true
type: string
responses:
200:
description: OK - the User object
schema:
$ref: '#/definitions/User'
404:
description: Unrecognized ID
schema:
$ref: '#/definitions/UnrecognizedID'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
################################################################################
# Definitions #
################################################################################
definitions:
# Models
Client:
properties:
id:
type: string
redirect_uris:
type: string
client_type:
type: string
authorization_grant_type:
type: string
client_secret:
type: string
name:
type: string
Person:
properties:
id:
type: string
profile_name: