· 5 years ago · Dec 03, 2020, 05:28 PM
1{
2 "swagger": "2.0",
3 "info": {
4 "version": "1.1",
5 "title": "PlayPosit API",
6 "description": "An overview of documentation for PlayPosit. The two roles, teacher and student, will dictate the outcome of an API call.\n\n [Updated v1.2] \n * Changed api version form 1.1 to 1.2. So API base path for all API's is : /api/1.2 \n * Added support for sharing sections between teachers. All sections API's are updated. Other APIs remains same.\n * <strong>[New - 27/06/2017]</strong> Added support for Teaching Assistant User in /validate API.\n * <strong>[New - 27/06/2017]</strong> Added new api to get sections for TA by remvoing duplicate student sections(if any).\n * <strong>[New - 14/08/2017]</strong> Added new api to get student's attempt data for a bulb.\n * <strong style=\"color:#89bf04;\">[New - 15/04/2018]</strong> Added new embed player which will use section_id of the class from where the student is launching the assignment.\n * <strong style=\"color:#89bf04;\">[New - 15/04/2018]</strong> Updated bulb data api to get student's attempt data for a bulb in a specific section.\n\n [Updated v1.1] \n * Changed api version form 1.0 to 1.1. So API base path is : /api/1.1 \n * Changed base path for /authorize API from /authorize to /api/1.1/authorize.\n * Changed base path for section API's from /section to /sections."
7 },
8 "basePath": "/api/1.2",
9 "schemes": [
10 "https"
11 ],
12 "securityDefinitions": {
13 "basicAuth": {
14 "type": "basic"
15 },
16 "Token": {
17 "type": "oauth2",
18 "authorizationUrl": "https://api.playposit.com/api/1.0/authorize",
19 "flow": "implicit",
20 "description": "Works over `HTTPS` and returns an `access_token` with a one hour expiration to use as a Bearer for all API calls. `access_token`"
21 }
22 },
23 "paths": {
24 "/authorize": {
25 "post": {
26 "tags": [
27 "admin"
28 ],
29 "summary": "Generates `access_token` with 24 hour expiration period.",
30 "security": [
31 {
32 "basicAuth": []
33 }
34 ],
35 "produces": [
36 "application/json"
37 ],
38 "parameters": [
39 {
40 "in": "formData",
41 "name": "client_id",
42 "description": "client_id provided to client",
43 "required": true,
44 "type": "string"
45 },
46 {
47 "in": "formData",
48 "name": "client_secret",
49 "description": "client_secret key provided to client",
50 "required": true,
51 "type": "string"
52 }
53 ],
54 "responses": {
55 "200": {
56 "description": "Returns an `access_token`",
57 "schema": {
58 "type": "string"
59 }
60 },
61 "400": {
62 "description": "Invalid client_id/client_secret or user_email provided."
63 }
64 }
65 }
66 },
67 "/user/validate": {
68 "post": {
69 "tags": [
70 "admin"
71 ],
72 "summary": "Logs user into the system. It will generate an user access_token, which will be used in validating all the api requests for this user.",
73 "security": [
74 {
75 "Token": []
76 }
77 ],
78 "produces": [
79 "application/json"
80 ],
81 "parameters": [
82 {
83 "in": "header",
84 "name": "Authorization",
85 "description": "use the master access_token for validating the user.",
86 "required": true,
87 "type": "string"
88 },
89 {
90 "in": "formData",
91 "name": "user_email",
92 "description": "The username/email for login",
93 "required": true,
94 "type": "string"
95 },
96 {
97 "in": "formData",
98 "name": "login_as",
99 "description": "<ul><li>If you need to login a teacher as student. Teacher has to signup separately as a student to do so. <b>When validating a user with both teacher and student access, priority is given to the teacher account over student. So if a user has to be spefically validated as a student 'student' value ahs to be passed in this paramtere.</b></li><li>To login a user as a <b>'teaching assistant'</b> pass in the value as <b>'ta'</b> in this field. It will generate both teacher and student access token for the user.</li></ul>",
100 "required": false,
101 "type": "string"
102 }
103 ],
104 "responses": {
105 "200": {
106 "description": "successful operation",
107 "schema": {
108 "$ref": "#/definitions/User"
109 }
110 },
111 "400": {
112 "description": "Invalid username supplied"
113 },
114 "401": {
115 "description": "Token expired"
116 },
117 "403": {
118 "description": "Forbidden from accessing user"
119 }
120 }
121 }
122 },
123 "/user/update": {
124 "put": {
125 "tags": [
126 "admin"
127 ],
128 "summary": "Update user details. Admin only call.",
129 "security": [
130 {
131 "Token": []
132 }
133 ],
134 "produces": [
135 "application/json"
136 ],
137 "parameters": [
138 {
139 "in": "header",
140 "name": "Authorization",
141 "description": "use the master access_token for validating the user.",
142 "required": true,
143 "type": "string"
144 },
145 {
146 "in": "query",
147 "name": "user_id",
148 "description": "User ID to update the details for.",
149 "required": true,
150 "type": "string"
151 },
152 {
153 "in": "query",
154 "name": "user_type",
155 "description": "User Type to update the details for. Only teacher/student.",
156 "required": true,
157 "type": "string"
158 },
159 {
160 "in": "formData",
161 "name": "email",
162 "description": "email of the user to update",
163 "required": false,
164 "type": "string"
165 },
166 {
167 "in": "formData",
168 "name": "first_name",
169 "description": "first_name of the user to update",
170 "required": false,
171 "type": "string"
172 },
173 {
174 "in": "formData",
175 "name": "last_name",
176 "description": "last_name of the user to update",
177 "required": false,
178 "type": "string"
179 },
180 {
181 "in": "formData",
182 "name": "school_id",
183 "description": "school_id of the user to update",
184 "required": false,
185 "type": "string"
186 },
187 {
188 "in": "formData",
189 "name": "kaltura_id",
190 "description": "The kaltura_id of the user",
191 "required": false,
192 "type": "string"
193 },
194 {
195 "in": "formData",
196 "name": "listed",
197 "description": "Bulb listing policy of the user.<br>0 - Bulbs are only visible for teachers of same school district. But accessible via direct link for everyone in Playposit.<br>1 - Bulbs are visible to everyone in PlayPosit.<br>2 - Bulbs are only to school admins and accessible via direct link for everyone in Playposit.<br>3 - Bulbs are only to school admins and not accessible via direct link for everyone in Playposit.",
198 "required": false,
199 "type": "string"
200 },
201 {
202 "in": "formData",
203 "name": "timezone",
204 "description": "(Teacher only) Default timezone for the teacher. Accepted values: ['US/Alaska','US/Aleutian','US/Arizona','US/Central','US/East-Indiana','US/Eastern','US/Hawaii','US/Indiana-Starke','US/Michigan','US/Mountain','US/Pacific','US/Pacific-New','US/Samoa','EST','PST','MST','UTC'] or any other values for TZ from <a href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\" target=\"_blank\">https://en.wikipedia.org/wiki/List_of_tz_database_time_zones</a>",
205 "required": false,
206 "type": "string"
207 }
208 ],
209 "responses": {
210 "200": {
211 "description": "successful operation",
212 "schema": {
213 "$ref": "#/definitions/User"
214 }
215 },
216 "400": {
217 "description": "Invalid username supplied"
218 },
219 "401": {
220 "description": "Token expired"
221 },
222 "403": {
223 "description": "Forbidden from accessing user"
224 }
225 }
226 }
227 },
228 "/user/signup": {
229 "post": {
230 "tags": [
231 "admin"
232 ],
233 "summary": "Sign up a new user either a teacher or student.",
234 "security": [
235 {
236 "Token": []
237 }
238 ],
239 "produces": [
240 "application/json"
241 ],
242 "parameters": [
243 {
244 "in": "header",
245 "name": "Authorization",
246 "description": "use the master access_token for validating the user.",
247 "required": true,
248 "type": "string"
249 },
250 {
251 "in": "formData",
252 "name": "user_email",
253 "description": "The username/email for login",
254 "required": true,
255 "type": "string"
256 },
257 {
258 "in": "formData",
259 "name": "user_type",
260 "description": "The user_type to be set for the user. teacher or student",
261 "required": true,
262 "type": "string"
263 },
264 {
265 "in": "formData",
266 "name": "first_name",
267 "description": "The first_name of the user",
268 "required": true,
269 "type": "string"
270 },
271 {
272 "in": "formData",
273 "name": "last_name",
274 "description": "The last_name of the user",
275 "required": true,
276 "type": "string"
277 },
278 {
279 "in": "formData",
280 "name": "school_id",
281 "description": "The school_id of the user",
282 "required": true,
283 "type": "string"
284 },
285 {
286 "in": "formData",
287 "name": "kaltura_id",
288 "description": "The kaltura_id of the user",
289 "required": false,
290 "type": "string"
291 },
292 {
293 "in": "formData",
294 "name": "listed",
295 "description": "Bulb listing policy of the user.<br>0 - Bulbs are only visible for teachers of same school district. But accessible via direct link for everyone in Playposit.<br>1 - Bulbs are visible to everyone in PlayPosit.<br>2 - Bulbs are only to school admins and accessible via direct link for everyone in Playposit.<br>3 - Bulbs are only to school admins and not accessible via direct link for everyone in Playposit.",
296 "required": false,
297 "type": "string"
298 },
299 {
300 "in": "formData",
301 "name": "timezone",
302 "description": "(Teacher only) Default timezone for the teacher. Accepted values: ['US/Alaska','US/Aleutian','US/Arizona','US/Central','US/East-Indiana','US/Eastern','US/Hawaii','US/Indiana-Starke','US/Michigan','US/Mountain','US/Pacific','US/Pacific-New','US/Samoa','EST','PST','MST','UTC'] or any other values for TZ from <a href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\" target=\"_blank\">https://en.wikipedia.org/wiki/List_of_tz_database_time_zones</a>",
303 "required": false,
304 "type": "string"
305 }
306 ],
307 "responses": {
308 "200": {
309 "description": "successful operation",
310 "schema": {
311 "$ref": "#/definitions/User"
312 }
313 },
314 "400": {
315 "description": "Must provide user_email, user_type, first_name, last_name, school_id. OR Invalid user_type. Must be teacher or student."
316 },
317 "401": {
318 "description": "Token expired"
319 },
320 "500": {
321 "description": "User signup not successful. OR School id not found."
322 }
323 }
324 }
325 },
326 "/user/refresh-token": {
327 "post": {
328 "tags": [
329 "admin"
330 ],
331 "summary": "Refresh the token for a teacher or student.",
332 "security": [
333 {
334 "Token": []
335 }
336 ],
337 "produces": [
338 "application/json"
339 ],
340 "parameters": [
341 {
342 "in": "header",
343 "name": "Authorization",
344 "description": "use the master access_token for validating the user.",
345 "required": true,
346 "type": "string"
347 },
348 {
349 "in": "formData",
350 "name": "previous_token",
351 "description": "Current access token for the user.",
352 "required": true,
353 "type": "string"
354 }
355 ],
356 "responses": {
357 "200": {
358 "description": "successful operation",
359 "schema": {
360 "$ref": "#/definitions/User"
361 }
362 },
363 "400": {
364 "description": "Invalid user_type. Must be teacher or student. OR Must provide access_token."
365 },
366 "401": {
367 "description": "Token expired"
368 },
369 "500": {
370 "description": "failed! please generate a new token. OR Unable to refresh token value."
371 }
372 }
373 }
374 },
375 "/schools": {
376 "get": {
377 "tags": [
378 "schools"
379 ],
380 "summary": "Get a list of schools assosiated with the master token. [Updated] changed the api base path from /school to /schools",
381 "security": [
382 {
383 "Token": []
384 }
385 ],
386 "produces": [
387 "application/json"
388 ],
389 "parameters": [
390 {
391 "in": "header",
392 "name": "Authorization",
393 "description": "use the master access_token for getting the assosiated schools.",
394 "required": true,
395 "type": "string"
396 }
397 ],
398 "responses": {
399 "200": {
400 "description": "successful operation",
401 "schema": {
402 "$ref": "#/definitions/User"
403 }
404 },
405 "401": {
406 "description": "Token expired"
407 }
408 }
409 },
410 "post": {
411 "tags": [
412 "schools"
413 ],
414 "summary": "Create a new school using a master token",
415 "security": [
416 {
417 "Token": []
418 }
419 ],
420 "produces": [
421 "application/json"
422 ],
423 "parameters": [
424 {
425 "in": "header",
426 "name": "Authorization",
427 "description": "use the master access_token creating a new school.",
428 "required": true,
429 "type": "string"
430 },
431 {
432 "in": "formData",
433 "name": "school_name",
434 "description": "Enter the school name.",
435 "required": true,
436 "type": "string"
437 },
438 {
439 "in": "formData",
440 "name": "active_color",
441 "description": "Enter the active_color(hex, rgb, rgba) of the embedded positPlayer for the school.",
442 "required": false,
443 "type": "string"
444 },
445 {
446 "in": "formData",
447 "name": "base_color",
448 "description": "Enter the base_color(hex, rgb, rgba) of the embedded positPlayer for the school.",
449 "required": false,
450 "type": "string"
451 },
452 {
453 "in": "formData",
454 "name": "inactive_color",
455 "description": "Enter the inactive_color(hex, rgb, rgba) of the embedded positPlayer for the school.",
456 "required": false,
457 "type": "string"
458 },
459 {
460 "in": "formData",
461 "name": "logo",
462 "description": "Enter the url for the logo for the embedded positPlayer for the school.",
463 "required": false,
464 "type": "string"
465 },
466 {
467 "in": "formData",
468 "name": "feedback_disabled",
469 "description": "Enable/Disable end of lesson feedback for all the lessons in the school. Value is true or false.",
470 "required": false,
471 "type": "string"
472 },
473 {
474 "in": "formData",
475 "name": "chat_disabled",
476 "description": "Enable/Disable chat for teachers and students in the school. Value is true or false.",
477 "required": false,
478 "type": "string"
479 },
480 {
481 "in": "formData",
482 "name": "score_disabled",
483 "description": "Enable/Disable end of lesson score screen in the school. Value is true or false.",
484 "required": false,
485 "type": "string"
486 }
487 ],
488 "responses": {
489 "200": {
490 "description": "successful operation",
491 "schema": {
492 "$ref": "#/definitions/School"
493 }
494 },
495 "400": {
496 "description": "Invalid paramters"
497 },
498 "401": {
499 "description": "Token expired"
500 },
501 "403": {
502 "description": "School with id school_id not found or is not accessiable."
503 },
504 "403-1": {
505 "description": "User type should be admin. Teacher or student user cannot make this call."
506 }
507 }
508 }
509 },
510 "/schools/{school_id}": {
511 "get": {
512 "tags": [
513 "schools"
514 ],
515 "summary": "Get school details associated with a school_id using a master token.",
516 "security": [
517 {
518 "Token": []
519 }
520 ],
521 "produces": [
522 "application/json"
523 ],
524 "parameters": [
525 {
526 "in": "header",
527 "name": "Authorization",
528 "description": "use the master access_token for getting the assosiated schools.",
529 "required": true,
530 "type": "string"
531 },
532 {
533 "in": "path",
534 "name": "school_id",
535 "description": "Enter the school id for which details are required",
536 "required": true,
537 "type": "string"
538 }
539 ],
540 "responses": {
541 "200": {
542 "description": "successful operation",
543 "schema": {
544 "$ref": "#/definitions/School"
545 }
546 },
547 "400": {
548 "description": "Invalid paramters"
549 },
550 "401": {
551 "description": "Token expired"
552 },
553 "403": {
554 "description": "School with id school_id not found or is not accessiable."
555 },
556 "403-1": {
557 "description": "User type should be admin. Teacher or student user cannot make this call."
558 }
559 }
560 },
561 "put": {
562 "tags": [
563 "schools"
564 ],
565 "summary": "Update school details associated with a school_id using a master token.",
566 "security": [
567 {
568 "Token": []
569 }
570 ],
571 "produces": [
572 "application/json"
573 ],
574 "parameters": [
575 {
576 "in": "header",
577 "name": "Authorization",
578 "description": "use the master access_token for getting the assosiated schools.",
579 "required": true,
580 "type": "string"
581 },
582 {
583 "in": "path",
584 "name": "school_id",
585 "description": "Enter the school id for which details are to be updated",
586 "required": true,
587 "type": "string"
588 },
589 {
590 "in": "formData",
591 "name": "school_name",
592 "description": "Enter the school name.",
593 "required": false,
594 "type": "string"
595 },
596 {
597 "in": "formData",
598 "name": "active_color",
599 "description": "Enter the active_color(hex, rgb, rgba) of the embedded positPlayer for the school.",
600 "required": false,
601 "type": "string"
602 },
603 {
604 "in": "formData",
605 "name": "base_color",
606 "description": "Enter the base_color(hex, rgb, rgba) of the embedded positPlayer for the school.",
607 "required": false,
608 "type": "string"
609 },
610 {
611 "in": "formData",
612 "name": "inactive_color",
613 "description": "Enter the inactive_color(hex, rgb, rgba) of the embedded positPlayer for the school.",
614 "required": false,
615 "type": "string"
616 },
617 {
618 "in": "formData",
619 "name": "logo",
620 "description": "Enter the url for the logo for the embedded positPlayer for the school.",
621 "required": false,
622 "type": "string"
623 },
624 {
625 "in": "formData",
626 "name": "feedback_disabled",
627 "description": "Enable/Disable end of lesson feedback for all the lessons in the school. Value is true or false.",
628 "required": false,
629 "type": "string"
630 },
631 {
632 "in": "formData",
633 "name": "chat_disabled",
634 "description": "Enable/Disable chat for teachers and students in the school. Value is true or false.",
635 "required": false,
636 "type": "string"
637 },
638 {
639 "in": "formData",
640 "name": "score_disabled",
641 "description": "Enable/Disable end of lesson score screen in the school. Value is true or false.",
642 "required": false,
643 "type": "string"
644 }
645 ],
646 "responses": {
647 "200": {
648 "description": "successful operation",
649 "schema": {
650 "$ref": "#/definitions/School"
651 }
652 },
653 "400": {
654 "description": "Invalid paramters"
655 },
656 "401": {
657 "description": "Token expired"
658 },
659 "403": {
660 "description": "School with id school_id not found or is not accessiable."
661 },
662 "403-1": {
663 "description": "User type should be admin. Teacher or student user cannot make this call."
664 },
665 "500": {
666 "description": "User type should be admin. Teacher or student user cannot make this call."
667 }
668 }
669 }
670 },
671 "/bulbs": {
672 "get": {
673 "tags": [
674 "bulbs"
675 ],
676 "summary": "Get a list of all lesson owned by or joined by user.",
677 "security": [
678 {
679 "Token": []
680 }
681 ],
682 "produces": [
683 "application/json"
684 ],
685 "parameters": [
686 {
687 "in": "header",
688 "name": "Authorization",
689 "description": "access_token for validating api requests as Bearer access_token",
690 "required": true,
691 "type": "string"
692 },
693 {
694 "in": "query",
695 "name": "user_id",
696 "description": "ID of teacher/student for which sections to be fetched. If not provided will take the user_id from the respective access_token.",
697 "required": false,
698 "type": "string",
699 "format": "string"
700 },
701 {
702 "in": "query",
703 "name": "user_type",
704 "description": "Type of user for which sections to be fetched - teacher or student. If not provided will take the user_type from the respective access_token.",
705 "required": false,
706 "type": "string"
707 }
708 ],
709 "responses": {
710 "200": {
711 "description": "successful operation",
712 "schema": {
713 "type": "string"
714 }
715 }
716 }
717 },
718 "post": {
719 "tags": [
720 "bulbs"
721 ],
722 "summary": "Create a new bulb. Only for teachers.",
723 "security": [
724 {
725 "Token": []
726 }
727 ],
728 "parameters": [
729 {
730 "in": "header",
731 "name": "Authorization",
732 "description": "access_token for validating api requests as Bearer access_token",
733 "required": true,
734 "type": "string"
735 },
736 {
737 "in": "formData",
738 "name": "title",
739 "description": "title for the new bulb to be created",
740 "required": true,
741 "type": "string"
742 },
743 {
744 "in": "formData",
745 "name": "video_id",
746 "description": "video_id for the new bulb to be created",
747 "required": true,
748 "type": "string"
749 },
750 {
751 "in": "formData",
752 "name": "duration",
753 "description": "duration of the video, as array ex: [start_time, end_time, total_time]",
754 "required": true,
755 "type": "string"
756 },
757 {
758 "in": "formData",
759 "name": "teacher_id",
760 "description": "ID of the teacher creating the bulb.",
761 "required": false,
762 "type": "string"
763 },
764 {
765 "in": "formData",
766 "name": "grade",
767 "description": "grade for the new bulb to be created",
768 "required": false,
769 "type": "string"
770 },
771 {
772 "in": "formData",
773 "name": "topic",
774 "description": "topic for the new bulb to be created",
775 "required": false,
776 "type": "string"
777 },
778 {
779 "in": "formData",
780 "name": "subtopic",
781 "description": "subtopic for the new bulb to be created",
782 "required": false,
783 "type": "string"
784 },
785 {
786 "in": "formData",
787 "name": "learning_objective",
788 "description": "learning_objective for the new bulb to be created",
789 "required": false,
790 "type": "string"
791 },
792 {
793 "in": "formData",
794 "name": "list_code",
795 "description": "list_code for the new bulb to be created",
796 "required": false,
797 "type": "string"
798 },
799 {
800 "in": "formData",
801 "name": "source",
802 "description": "source type for the new bulb to be created. 0 - youtube, 1 - vimeo, 2 - teacher-tube",
803 "required": false,
804 "type": "string"
805 },
806 {
807 "in": "formData",
808 "name": "rewind_yes",
809 "description": "rewind_yes students can rewind when questions are displayed",
810 "required": false,
811 "type": "string"
812 },
813 {
814 "in": "formData",
815 "name": "is_assignment",
816 "description": "1 - if it a student made lesson, 0/null - for normal lesson",
817 "required": false,
818 "type": "string"
819 },
820 {
821 "in": "formData",
822 "name": "thumbnail",
823 "description": "thumbnail for the lesson",
824 "required": false,
825 "type": "string"
826 },
827 {
828 "in": "formData",
829 "name": "ccss",
830 "description": "ccss",
831 "required": false,
832 "type": "string"
833 }
834 ],
835 "produces": [
836 "application/json"
837 ],
838 "responses": {
839 "200": {
840 "description": "successful operation",
841 "schema": {
842 "type": "string"
843 }
844 },
845 "400": {
846 "description": "Must provide valid title, and video_id."
847 },
848 "403": {
849 "description": "Invalid user opertation. Students cannot create a new lesson."
850 }
851 }
852 }
853 },
854 "/bulbs/{bulb_id}": {
855 "get": {
856 "tags": [
857 "bulbs"
858 ],
859 "summary": "Get a specific bulb. For teacher(with enrollment) and students",
860 "security": [
861 {
862 "Token": []
863 }
864 ],
865 "produces": [
866 "application/json"
867 ],
868 "parameters": [
869 {
870 "in": "header",
871 "name": "Authorization",
872 "description": "access_token for validating api requests as Bearer access_token",
873 "required": true,
874 "type": "string"
875 },
876 {
877 "in": "path",
878 "name": "bulb_id",
879 "description": "ID of bulb that needs to be fetched",
880 "required": true,
881 "type": "string"
882 }
883 ],
884 "responses": {
885 "200": {
886 "description": "successful operation",
887 "schema": {
888 "$ref": "#/definitions/Bulb"
889 }
890 },
891 "400": {
892 "description": "Must provide valid bulb_id."
893 }
894 }
895 },
896 "put": {
897 "tags": [
898 "bulbs"
899 ],
900 "summary": "Update details for a specific bulb. Only for teachers",
901 "security": [
902 {
903 "Token": []
904 }
905 ],
906 "produces": [
907 "application/json"
908 ],
909 "parameters": [
910 {
911 "in": "header",
912 "name": "Authorization",
913 "description": "access_token for validating api requests as Bearer access_token",
914 "required": true,
915 "type": "string"
916 },
917 {
918 "in": "path",
919 "name": "bulb_id",
920 "description": "ID of bulb that needs to be updated",
921 "required": true,
922 "type": "string"
923 },
924 {
925 "in": "formData",
926 "name": "title",
927 "description": "title for the bulb to be updated",
928 "required": false,
929 "type": "string"
930 },
931 {
932 "in": "formData",
933 "name": "video_id",
934 "description": "video_id for the bulb to be updated",
935 "required": false,
936 "type": "string"
937 },
938 {
939 "in": "formData",
940 "name": "duration",
941 "description": "duration of the video, as array ex: [start_time, end_time, total_time]",
942 "required": false,
943 "type": "string"
944 },
945 {
946 "in": "formData",
947 "name": "grade",
948 "description": "grade for the bulb to be updated",
949 "required": false,
950 "type": "string"
951 },
952 {
953 "in": "formData",
954 "name": "topic",
955 "description": "topic for the bulb to be updated",
956 "required": false,
957 "type": "string"
958 },
959 {
960 "in": "formData",
961 "name": "subtopic",
962 "description": "subtopic for the bulb to be updated",
963 "required": false,
964 "type": "string"
965 },
966 {
967 "in": "formData",
968 "name": "learning_objective",
969 "description": "learning_objective for the bulb to be updated",
970 "required": false,
971 "type": "string"
972 },
973 {
974 "in": "formData",
975 "name": "list_code",
976 "description": "list_code for the bulb to be updated",
977 "required": false,
978 "type": "string"
979 },
980 {
981 "in": "formData",
982 "name": "source",
983 "description": "source type for the bulb to be updated. 0 - youtube, 1 - vimeo, 2 - teacher-tube",
984 "required": false,
985 "type": "string"
986 },
987 {
988 "in": "formData",
989 "name": "rewind_yes",
990 "description": "rewind_yes students can rewind when questions are displayed",
991 "required": false,
992 "type": "string"
993 },
994 {
995 "in": "formData",
996 "name": "is_assignment",
997 "description": "1 - if it a student made lesson, 0/null - for normal lesson",
998 "required": false,
999 "type": "string"
1000 },
1001 {
1002 "in": "formData",
1003 "name": "thumbnail",
1004 "description": "thumbnail for the lesson",
1005 "required": false,
1006 "type": "string"
1007 },
1008 {
1009 "in": "formData",
1010 "name": "ccss",
1011 "description": "ccss",
1012 "required": false,
1013 "type": "string"
1014 }
1015 ],
1016 "responses": {
1017 "200": {
1018 "description": "successful operation",
1019 "schema": {
1020 "type": "string"
1021 }
1022 },
1023 "400": {
1024 "description": "Must provide valid bulb_id."
1025 },
1026 "403": {
1027 "description": "Invalid user opertation. Students cannot update an existing lesson."
1028 }
1029 }
1030 },
1031 "delete": {
1032 "tags": [
1033 "bulbs"
1034 ],
1035 "summary": "Delete a specific bulb. Only for teachers.",
1036 "security": [
1037 {
1038 "Token": []
1039 }
1040 ],
1041 "produces": [
1042 "application/json"
1043 ],
1044 "parameters": [
1045 {
1046 "in": "header",
1047 "name": "Authorization",
1048 "description": "access_token for validating api requests as Bearer access_token",
1049 "required": true,
1050 "type": "string"
1051 },
1052 {
1053 "in": "path",
1054 "name": "bulb_id",
1055 "description": "ID of bulb that needs to be deleted",
1056 "required": true,
1057 "type": "string"
1058 }
1059 ],
1060 "responses": {
1061 "200": {
1062 "description": "successful operation",
1063 "schema": {
1064 "type": "string"
1065 }
1066 },
1067 "400": {
1068 "description": "Must provide valid bulb_id."
1069 },
1070 "403": {
1071 "description": "Invalid user opertation. Students cannot delete an existing lesson."
1072 }
1073 }
1074 }
1075 },
1076 "/bulbs/clone/{bulb_id}": {
1077 "post": {
1078 "tags": [
1079 "bulbs"
1080 ],
1081 "summary": "Clone a bulb. Only for teachers",
1082 "security": [
1083 {
1084 "Token": []
1085 }
1086 ],
1087 "produces": [
1088 "application/json"
1089 ],
1090 "parameters": [
1091 {
1092 "in": "header",
1093 "name": "Authorization",
1094 "description": "access_token for validating api requests as Bearer access_token",
1095 "required": true,
1096 "type": "string"
1097 },
1098 {
1099 "in": "path",
1100 "name": "bulb_id",
1101 "description": "ID of bulb that needs to be updated",
1102 "required": true,
1103 "type": "string"
1104
1105 },
1106 {
1107 "in": "formData",
1108 "name": "teacher_id",
1109 "description": "teacher_id for the bulb to be cloned",
1110 "required": false,
1111 "type": "string"
1112 }
1113 ],
1114 "responses": {
1115 "200": {
1116 "description": "successful operation",
1117 "schema": {
1118 "type": "string"
1119 }
1120 },
1121 "400": {
1122 "description": "Must provide valid bulb_id."
1123 },
1124 "403": {
1125 "description": "Invalid user opertation. Students cannot clone an existing lesson."
1126 }
1127 }
1128 }
1129 },
1130 "/bulbs/data/{bulb_id}": {
1131 "get": {
1132 "tags": [
1133 "bulbs"
1134 ],
1135 "summary": "Get student's data for the bulb. [NEW]",
1136 "security": [
1137 {
1138 "Token": []
1139 }
1140 ],
1141 "produces": [
1142 "application/json"
1143 ],
1144 "parameters": [
1145 {
1146 "in": "header",
1147 "name": "Authorization",
1148 "description": "access_token for validating api requests as Bearer access_token",
1149 "required": true,
1150 "type": "string"
1151 },
1152 {
1153 "in": "path",
1154 "name": "bulb_id",
1155 "description": "ID of bulb that needs to be updated",
1156 "required": true,
1157 "type": "string"
1158 },
1159 {
1160 "in": "query",
1161 "name": "section_id",
1162 "description": "Section ID where the bulb is attempted in.",
1163 "required": false,
1164 "type": "string"
1165 }
1166 ],
1167 "responses": {
1168 "200": {
1169 "description": "success",
1170 "schema": {
1171 "$ref": "#/definitions/student_data"
1172 }
1173 },
1174 "400": {
1175 "description": "Must provide valid bulb_id."
1176 },
1177 "403": {
1178 "description": "Invalid user opertation. Students cannot clone an existing lesson."
1179 }
1180 }
1181 }
1182 },
1183 "/sections": {
1184 "get": {
1185 "tags": [
1186 "sections [updated]"
1187 ],
1188 "summary": "Get a list of all sections owned by or joined by user.",
1189 "security": [
1190 {
1191 "Token": []
1192 }
1193 ],
1194 "produces": [
1195 "application/json"
1196 ],
1197 "parameters": [
1198 {
1199 "in": "header",
1200 "name": "Authorization",
1201 "description": "access_token for validating api requests as Bearer access_token",
1202 "required": true,
1203 "type": "string"
1204 },
1205 {
1206 "in": "query",
1207 "name": "user_id",
1208 "description": "ID of teacher/student for which sections to be fetched. If not provided will take the user_id from the respective access_token.",
1209 "required": false,
1210 "type": "string",
1211 "format": "string"
1212 },
1213 {
1214 "in": "query",
1215 "name": "user_type",
1216 "description": "Type of user for which sections to be fetched - teacher or student. If not provided will take the user_type from the respective access_token.",
1217 "required": false,
1218 "type": "string"
1219 }
1220 ],
1221 "responses": {
1222 "200": {
1223 "description": "successful operation",
1224 "schema": {
1225 "type": "string"
1226 }
1227 }
1228 }
1229 },
1230 "post": {
1231 "tags": [
1232 "sections [updated]"
1233 ],
1234 "summary": "Created a new section. Only for teachers",
1235 "security": [
1236 {
1237 "Token": []
1238 }
1239 ],
1240 "produces": [
1241 "application/json"
1242 ],
1243 "parameters": [
1244 {
1245 "in": "header",
1246 "name": "Authorization",
1247 "description": "access_token for validating api requests as Bearer access_token",
1248 "required": true,
1249 "type": "string"
1250 },
1251 {
1252 "in": "formData",
1253 "name": "user_id",
1254 "description": "ID of teacher/student for which sections to be created. If not provided will take the user_id from the respective access_token.",
1255 "required": false,
1256 "type": "string",
1257 "format": "string"
1258 },
1259 {
1260 "in": "formData",
1261 "name": "user_type",
1262 "description": "Type of user for which sections to be created - teacher or student. If not provided will take the user_type from the respective access_token.",
1263 "required": false,
1264 "type": "string"
1265 },
1266 {
1267 "in": "formData",
1268 "name": "section_name",
1269 "description": "Name of section that needs to be created",
1270 "required": true,
1271 "type": "string"
1272 },
1273 {
1274 "in": "formData",
1275 "name": "section_description",
1276 "description": "Description of section that needs to be created",
1277 "required": false,
1278 "type": "string"
1279 }
1280 ],
1281 "responses": {
1282 "200": {
1283 "description": "successful operation",
1284 "schema": {
1285 "type": "string"
1286 }
1287 },
1288 "400": {
1289 "description": "Must provide valid section_name to create new section."
1290 },
1291 "403": {
1292 "description": "User type 'student' cannot create a section."
1293 }
1294 }
1295 }
1296 },
1297 "/sections/{section_id}": {
1298 "get": {
1299 "tags": [
1300 "sections [updated]"
1301 ],
1302 "summary": "Get a specific section. For teacher(with lessons and students) and students",
1303 "security": [
1304 {
1305 "Token": []
1306 }
1307 ],
1308 "produces": [
1309 "application/json"
1310 ],
1311 "parameters": [
1312 {
1313 "in": "header",
1314 "name": "Authorization",
1315 "description": "access_token for validating api requests as Bearer access_token",
1316 "required": true,
1317 "type": "string"
1318 },
1319 {
1320 "in": "path",
1321 "name": "section_id",
1322 "description": "ID of section that needs to be fetched",
1323 "required": true,
1324 "type": "string"
1325 }
1326 ],
1327 "responses": {
1328 "200": {
1329 "description": "successful operation",
1330 "schema": {
1331 "$ref": "#/definitions/Section"
1332 }
1333 },
1334 "400": {
1335 "description": "Must provide valid section_id."
1336 }
1337 }
1338 },
1339 "put": {
1340 "tags": [
1341 "sections [updated]"
1342 ],
1343 "summary": "Update details of a specific section. Only for teachers.",
1344 "security": [
1345 {
1346 "Token": []
1347 }
1348 ],
1349 "produces": [
1350 "application/json"
1351 ],
1352 "parameters": [
1353 {
1354 "in": "header",
1355 "name": "Authorization",
1356 "description": "access_token for validating api requests as Bearer access_token",
1357 "required": true,
1358 "type": "string"
1359 },
1360 {
1361 "in": "path",
1362 "name": "section_id",
1363 "description": "ID of section that needs to be updated",
1364 "required": true,
1365 "type": "string"
1366 },
1367 {
1368 "in": "formData",
1369 "name": "section_name",
1370 "description": "Name of section that needs to be updated",
1371 "required": false,
1372 "type": "string"
1373 },
1374 {
1375 "in": "formData",
1376 "name": "section_description",
1377 "description": "Description of section that needs to be updated",
1378 "required": false,
1379 "type": "string"
1380 },
1381 {
1382 "in": "formData",
1383 "name": "root_id",
1384 "description": "root_id of section that needs to be updated",
1385 "required": false,
1386 "type": "string"
1387 }
1388 ],
1389 "responses": {
1390 "200": {
1391 "description": "successful operation",
1392 "schema": {
1393 "type": "string"
1394 }
1395 },
1396 "500": {
1397 "description": "Update section not successful"
1398 },
1399 "400": {
1400 "description": "Must provide valid section_name to update a section."
1401 },
1402 "403": {
1403 "description": "User type 'student' cannot update a section."
1404 }
1405 }
1406 },
1407 "delete": {
1408 "tags": [
1409 "sections [updated]"
1410 ],
1411 "summary": "If teacher, deletes section.",
1412 "security": [
1413 {
1414 "Token": []
1415 }
1416 ],
1417 "produces": [
1418 "application/json"
1419 ],
1420 "parameters": [
1421 {
1422 "in": "header",
1423 "name": "Authorization",
1424 "description": "access_token for validating api requests as Bearer access_token",
1425 "required": true,
1426 "type": "string"
1427 },
1428 {
1429 "in": "path",
1430 "name": "section_id",
1431 "description": "ID of section that needs to be deleted",
1432 "required": true,
1433 "type": "string"
1434 }
1435 ],
1436 "responses": {
1437 "200": {
1438 "description": "successful operation",
1439 "schema": {
1440 "type": "string"
1441 }
1442 },
1443 "500": {
1444 "description": "Delete section not successful"
1445 },
1446 "400": {
1447 "description": "Must provide valid section_name to delete a section."
1448 },
1449 "403": {
1450 "description": "User type 'student' cannot delete a section."
1451 }
1452 }
1453 }
1454 },
1455 "/sections/default/{default_section_id}": {
1456 "post": {
1457 "tags": [
1458 "sections [updated]"
1459 ],
1460 "summary": "A teacher can assign a default section to itself. The section to be assigned must be previously created by any teacher in the school district (Ex. any school that belongs to the lexislearn academy).",
1461 "security": [
1462 {
1463 "Token": []
1464 }
1465 ],
1466 "produces": [
1467 "application/json"
1468 ],
1469 "parameters": [
1470 {
1471 "in": "header",
1472 "name": "Authorization",
1473 "description": "access_token for validating api requests as Bearer access_token",
1474 "required": true,
1475 "type": "string"
1476 },
1477 {
1478 "in": "path",
1479 "name": "default_section_id",
1480 "description": "ID of section which is to be assigned",
1481 "required": true,
1482 "type": "string"
1483 }
1484 ],
1485 "responses": {
1486 "200": {
1487 "description": "successful operation",
1488 "schema": {
1489 "$ref": "#/definitions/Section"
1490 }
1491 },
1492 "400": {
1493 "description": "Must provide valid section_id."
1494 },
1495 "403": {
1496 "description": "User type 'student' cannot assign a section."
1497 },
1498 "500": {
1499 "description": "Section association not successful."
1500 }
1501 }
1502 }
1503 },
1504 "/sections/share/{section_id}/teacher/": {
1505 "post": {
1506 "tags": [
1507 "sections [updated]"
1508 ],
1509 "summary": "A teacher can share a section with another teacher in the school district (Ex. any school that belongs to the lexislearn academy).",
1510 "security": [
1511 {
1512 "Token": []
1513 }
1514 ],
1515 "produces": [
1516 "application/json"
1517 ],
1518 "parameters": [
1519 {
1520 "in": "header",
1521 "name": "Authorization",
1522 "description": "access_token for validating api requests as Bearer access_token",
1523 "required": true,
1524 "type": "string"
1525 },
1526 {
1527 "in": "path",
1528 "name": "section_id",
1529 "description": "ID of section which is to be shared.",
1530 "required": true,
1531 "type": "string"
1532 },
1533 {
1534 "in": "query",
1535 "name": "teacher_email",
1536 "description": "Email ID of teacher with whom to be shared.",
1537 "required": false,
1538 "type": "string"
1539 },
1540 {
1541 "in": "query",
1542 "name": "teacher_id",
1543 "description": "Teacher ID of teacher with whom to be shared.",
1544 "required": false,
1545 "type": "string"
1546 }
1547 ],
1548 "responses": {
1549 "200": {
1550 "description": "successful operation",
1551 "schema": {
1552 "$ref": "#/definitions/Section"
1553 }
1554 },
1555 "400": {
1556 "description": "Must provide valid section_id and teacher_id."
1557 },
1558 "403": {
1559 "description": "User type 'student' cannot share a section."
1560 },
1561 "500": {
1562 "description": "Section sharing not successful."
1563 }
1564 }
1565 },
1566 "delete": {
1567 "tags": [
1568 "sections [updated]"
1569 ],
1570 "summary": "A teacher can revoke access to a section shared with another teacher previously in the school district (Ex. any school that belongs to the lexislearn academy).",
1571 "security": [
1572 {
1573 "Token": []
1574 }
1575 ],
1576 "produces": [
1577 "application/json"
1578 ],
1579 "parameters": [
1580 {
1581 "in": "header",
1582 "name": "Authorization",
1583 "description": "access_token for validating api requests as Bearer access_token",
1584 "required": true,
1585 "type": "string"
1586 },
1587 {
1588 "in": "path",
1589 "name": "section_id",
1590 "description": "ID of section which is to be shared.",
1591 "required": true,
1592 "type": "string"
1593 },
1594 {
1595 "in": "query",
1596 "name": "teacher_email",
1597 "description": "Email ID of teacher with whom to be shared.",
1598 "required": false,
1599 "type": "string"
1600 },
1601 {
1602 "in": "query",
1603 "name": "teacher_id",
1604 "description": "Teacher ID of teacher with whom to be shared.",
1605 "required": false,
1606 "type": "string"
1607 }
1608 ],
1609 "responses": {
1610 "200": {
1611 "description": "successful operation",
1612 "schema": {
1613 "$ref": "#/definitions/Section"
1614 }
1615 },
1616 "400": {
1617 "description": "Must provide valid section_id and teacher_id."
1618 },
1619 "403": {
1620 "description": "User type 'student' cannot do this operation."
1621 },
1622 "500": {
1623 "description": "Section access revoking not successful."
1624 }
1625 }
1626 }
1627 },
1628 "/sections/default": {
1629 "delete": {
1630 "tags": [
1631 "sections [updated]"
1632 ],
1633 "summary": "Will delete any default sections associated with the teacher.",
1634 "security": [
1635 {
1636 "Token": []
1637 }
1638 ],
1639 "produces": [
1640 "application/json"
1641 ],
1642 "parameters": [
1643 {
1644 "in": "header",
1645 "name": "Authorization",
1646 "description": "access_token for validating api requests as Bearer access_token",
1647 "required": true,
1648 "type": "string"
1649 }
1650 ],
1651 "responses": {
1652 "200": {
1653 "description": "success",
1654 "schema": {
1655 "$ref": "#/definitions/Section"
1656 }
1657 },
1658 "403": {
1659 "description": "User type 'student' cannot assign a section."
1660 },
1661 "500": {
1662 "description": "Section association not successful."
1663 }
1664 }
1665 }
1666 },
1667 "/sections/{section_id}/bulbs/{bulb_id}": {
1668 "post": {
1669 "tags": [
1670 "sections [updated]"
1671 ],
1672 "summary": "If teacher, assign the bulb to the section.",
1673 "security": [
1674 {
1675 "Token": []
1676 }
1677 ],
1678 "produces": [
1679 "application/json"
1680 ],
1681 "parameters": [
1682 {
1683 "in": "header",
1684 "name": "Authorization",
1685 "description": "access_token for validating api requests as Bearer access_token",
1686 "required": true,
1687 "type": "string"
1688 },
1689 {
1690 "in": "path",
1691 "name": "section_id",
1692 "description": "ID of section where bulb is to be assigned",
1693 "required": true,
1694 "type": "string"
1695 },
1696 {
1697 "in": "path",
1698 "name": "bulb_id",
1699 "description": "ID of bulb which is to be assigned",
1700 "required": true,
1701 "type": "string"
1702 },
1703 {
1704 "in": "formData",
1705 "name": "assigned_date",
1706 "description": "Assignment due date",
1707 "required": true,
1708 "type": "dateTime"
1709 }
1710 ],
1711 "responses": {
1712 "200": {
1713 "description": "successful operation",
1714 "schema": {
1715 "$ref": "#/definitions/Section"
1716 }
1717 },
1718 "400": {
1719 "description": "Must provide valid section_id, bulb_id, and assigned_date."
1720 },
1721 "403": {
1722 "description": "User type 'student' cannot assign a bulb to a section."
1723 },
1724 "500": {
1725 "description": "Lesson association to section not successful."
1726 }
1727 }
1728 },
1729 "put": {
1730 "tags": [
1731 "sections [updated]"
1732 ],
1733 "summary": "If teacher, update the assigned bulb in the section.",
1734 "security": [
1735 {
1736 "Token": []
1737 }
1738 ],
1739 "produces": [
1740 "application/json"
1741 ],
1742 "parameters": [
1743 {
1744 "in": "header",
1745 "name": "Authorization",
1746 "description": "access_token for validating api requests as Bearer access_token",
1747 "required": true,
1748 "type": "string"
1749 },
1750 {
1751 "in": "path",
1752 "name": "section_id",
1753 "description": "ID of section where bulb is to be assigned",
1754 "required": true,
1755 "type": "string"
1756 },
1757 {
1758 "in": "path",
1759 "name": "bulb_id",
1760 "description": "ID of bulb which is to be assigned",
1761 "required": true,
1762 "type": "string"
1763 },
1764 {
1765 "in": "formData",
1766 "name": "assigned_date",
1767 "description": "Assignment due date",
1768 "required": true,
1769 "type": "dateTime"
1770 }
1771 ],
1772 "responses": {
1773 "200": {
1774 "description": "successful operation",
1775 "schema": {
1776 "$ref": "#/definitions/Section"
1777 }
1778 },
1779 "400": {
1780 "description": "Must provide valid section_id, bulb_id, and assigned_date."
1781 },
1782 "403": {
1783 "description": "User type 'student' cannot assign a bulb to a section."
1784 },
1785 "500": {
1786 "description": "Lesson association to section not successful."
1787 }
1788 }
1789 },
1790 "delete": {
1791 "tags": [
1792 "sections [updated]"
1793 ],
1794 "summary": "If teacher, remove the bulb from the section.",
1795 "security": [
1796 {
1797 "Token": []
1798 }
1799 ],
1800 "produces": [
1801 "application/json"
1802 ],
1803 "parameters": [
1804 {
1805 "in": "header",
1806 "name": "Authorization",
1807 "description": "access_token for validating api requests as Bearer access_token",
1808 "required": true,
1809 "type": "string"
1810 },
1811 {
1812 "in": "path",
1813 "name": "section_id",
1814 "description": "ID of section where bulb is to be assigned",
1815 "required": true,
1816 "type": "string"
1817 },
1818 {
1819 "in": "path",
1820 "name": "bulb_id",
1821 "description": "ID of bulb which is to be assigned",
1822 "required": true,
1823 "type": "string"
1824 }
1825 ],
1826 "responses": {
1827 "200": {
1828 "description": "successful operation",
1829 "schema": {
1830 "$ref": "#/definitions/Section"
1831 }
1832 },
1833 "400": {
1834 "description": "Must provide valid section_id, bulb_id."
1835 },
1836 "403": {
1837 "description": "User type 'student' cannot remove an assigned bulb from a section."
1838 },
1839 "500": {
1840 "description": "Lesson dissociation to section not successful."
1841 }
1842 }
1843 }
1844 },
1845 "/sections/{section_id}/students/{student_id}": {
1846 "post": {
1847 "tags": [
1848 "sections [updated]"
1849 ],
1850 "summary": "If teacher, assign the section to the student.",
1851 "security": [
1852 {
1853 "Token": []
1854 }
1855 ],
1856 "produces": [
1857 "application/json"
1858 ],
1859 "parameters": [
1860 {
1861 "in": "header",
1862 "name": "Authorization",
1863 "description": "access_token for validating api requests as Bearer access_token",
1864 "required": true,
1865 "type": "string"
1866 },
1867 {
1868 "in": "path",
1869 "name": "section_id",
1870 "description": "ID of section which is to be assigned",
1871 "required": true,
1872 "type": "string"
1873 },
1874 {
1875 "in": "path",
1876 "name": "student_id",
1877 "description": "ID of student to whom the section is to be assigned",
1878 "required": true,
1879 "type": "string"
1880 }
1881 ],
1882 "responses": {
1883 "200": {
1884 "description": "successful operation"
1885 },
1886 "400": {
1887 "description": "Must provide valid section_id, student_id."
1888 },
1889 "403": {
1890 "description": "User type 'student' cannot assign a student to a section."
1891 },
1892 "500": {
1893 "description": "Assign student to a section not successful"
1894 }
1895 }
1896 },
1897 "delete": {
1898 "tags": [
1899 "sections [updated]"
1900 ],
1901 "summary": "If teacher, remove the section from the student's list of sections.",
1902 "security": [
1903 {
1904 "Token": []
1905 }
1906 ],
1907 "produces": [
1908 "application/json"
1909 ],
1910 "parameters": [
1911 {
1912 "in": "header",
1913 "name": "Authorization",
1914 "description": "access_token for validating api requests as Bearer access_token",
1915 "required": true,
1916 "type": "string"
1917 },
1918 {
1919 "in": "path",
1920 "name": "section_id",
1921 "description": "ID of section which is to be removed",
1922 "required": true,
1923 "type": "string"
1924 },
1925 {
1926 "in": "path",
1927 "name": "student_id",
1928 "description": "ID of student from whom the section is to be removed",
1929 "required": true,
1930 "type": "string"
1931 }
1932 ],
1933 "responses": {
1934 "200": {
1935 "description": "successful operation",
1936 "schema": {
1937 "$ref": "#/definitions/Section"
1938 }
1939 },
1940 "400": {
1941 "description": "Must provide valid section_id, student_id."
1942 },
1943 "403": {
1944 "description": "User type 'student' cannot remove a student to a section."
1945 },
1946 "500": {
1947 "description": "Remove student from a section not successful"
1948 }
1949 }
1950 }
1951 },
1952 "/sections/ta/{teacher_id}": {
1953 "get": {
1954 "tags": [
1955 "sections [updated]"
1956 ],
1957 "summary": "Will return all the sections for the Teaching Assistant(ta).",
1958 "security": [
1959 {
1960 "Token": []
1961 }
1962 ],
1963 "produces": [
1964 "application/json"
1965 ],
1966 "parameters": [
1967 {
1968 "in": "header",
1969 "name": "Authorization",
1970 "description": "access_token (teacher_token) for validating api requests as Bearer access_token",
1971 "required": true,
1972 "type": "string"
1973 },
1974 {
1975 "in": "path",
1976 "name": "teacher_id",
1977 "description": "teacher_id of the Teaching Assistant user.",
1978 "required": true,
1979 "type": "string"
1980 },
1981 {
1982 "in": "query",
1983 "name": "student_id",
1984 "description": "student_id of the Teaching Assistant user.",
1985 "required": true,
1986 "type": "string"
1987 }
1988 ],
1989 "responses": {
1990 "200": {
1991 "description": "success",
1992 "schema": {
1993 "$ref": "#/definitions/Section"
1994 }
1995 },
1996 "400": {
1997 "description": "Bad Request. Must provide valid teacher_id and student_id (Number only)."
1998 },
1999 "403": {
2000 "description": "Bad Request. Must provide valid teacher_id and student_id (Number only)."
2001 },
2002 "500": {
2003 "description": "Unable to retrieve sections for Teaching Assistant."
2004 }
2005 }
2006 }
2007 },
2008 "embed-player": {
2009 "get": {
2010 "tags": [
2011 "embed"
2012 ],
2013 "summary": "Follow the below steps to embed the playposit player in your application",
2014 "parameters": [
2015 {
2016 "in": "path",
2017 "name": "bulb_id",
2018 "description": "bulb_id of the lesson to be embedded",
2019 "required": true,
2020 "type": "string"
2021 },
2022 {
2023 "in": "path",
2024 "name": "access_token",
2025 "description": "access_token of the user generated using /authorize to embed the lesson (Without the bearer keyword as it is going in as query params).",
2026 "required": true,
2027 "type": "string"
2028 }
2029 ]
2030 }
2031 },
2032 "embed-player-new": {
2033 "get": {
2034 "tags": [
2035 "embed"
2036 ],
2037 "summary": "[New Feature] Follow the below steps to embed the new playposit player in your application.",
2038 "parameters": [
2039 {
2040 "in": "path",
2041 "name": "section_id",
2042 "description": "section_id/class_id from where the student will be taking the lesson",
2043 "required": true,
2044 "type": "string"
2045 },
2046 {
2047 "in": "path",
2048 "name": "bulb_id",
2049 "description": "bulb_id of the lesson to be embedded",
2050 "required": true,
2051 "type": "string"
2052 },
2053 {
2054 "in": "path",
2055 "name": "access_token",
2056 "description": "access_token of the user generated using /authorize to embed the lesson (Without the bearer keyword as it is going in as query params).",
2057 "required": true,
2058 "type": "string"
2059 }
2060 ]
2061 }
2062 },
2063 "embed-analytics": {
2064 "get": {
2065 "tags": [
2066 "embed"
2067 ],
2068 "summary": "Follow the below steps to embed playposit analytics in your application",
2069 "parameters": [
2070 {
2071 "in": "path",
2072 "name": "section_id",
2073 "description": "section of the teacher",
2074 "required": false,
2075 "type": "string"
2076 },
2077 {
2078 "in": "path",
2079 "name": "bulb_id",
2080 "description": "bulb_id of the the teacher",
2081 "required": false,
2082 "type": "string"
2083 },
2084 {
2085 "in": "path",
2086 "name": "access_token",
2087 "description": "access_token of the user generated using /authorize to embed the lesson (Without the bearer keyword as it is going in as query params).",
2088 "required": true,
2089 "type": "string"
2090 }
2091 ]
2092 }
2093 },
2094 "/export-grade/lessons/{teacher_id}": {
2095 "get": {
2096 "tags": [
2097 "export [new]"
2098 ],
2099 "summary": "Exports grades for all the lessons of a particular teacher. Extension of 'api/1.0/teachers/:teacher_id/lessonsgrades'",
2100 "security": [
2101 {
2102 "Token": []
2103 }
2104 ],
2105 "produces": [
2106 "application/json"
2107 ],
2108 "parameters": [
2109 {
2110 "in": "header",
2111 "name": "Authorization",
2112 "description": "access_token for validating api requests as Bearer access_token",
2113 "required": true,
2114 "type": "string"
2115 },
2116 {
2117 "in": "path",
2118 "name": "teacher_id",
2119 "description": "ID of teacher for which data is to be exported.",
2120 "required": true,
2121 "type": "string"
2122 }
2123 ],
2124 "responses": {
2125 "200": {
2126 "description": "successful operation",
2127 "schema": {
2128 "$ref": "#/definitions/ExportGrade"
2129 }
2130 },
2131 "400": {
2132 "description": "Must provide valid teacher_id."
2133 }
2134 }
2135 }
2136 },
2137 "/export-grade/lessons/assigned/{teacher_id}": {
2138 "get": {
2139 "tags": [
2140 "export [new]"
2141 ],
2142 "summary": "Exports grades for all the assigned lessons of a particular teacher.",
2143 "security": [
2144 {
2145 "Token": []
2146 }
2147 ],
2148 "produces": [
2149 "application/json"
2150 ],
2151 "parameters": [
2152 {
2153 "in": "header",
2154 "name": "Authorization",
2155 "description": "access_token for validating api requests as Bearer access_token",
2156 "required": true,
2157 "type": "string"
2158 },
2159 {
2160 "in": "path",
2161 "name": "teacher_id",
2162 "description": "ID of teacher for which data is to be exported.",
2163 "required": true,
2164 "type": "string"
2165 }
2166 ],
2167 "responses": {
2168 "200": {
2169 "description": "successful operation",
2170 "schema": {
2171 "$ref": "#/definitions/ExportGrade"
2172 }
2173 },
2174 "400": {
2175 "description": "Must provide valid teacher_id."
2176 }
2177 }
2178 }
2179 }
2180 },
2181 "definitions": {
2182 "User": {
2183 "type": "object",
2184 "properties": {
2185 "id": {
2186 "type": "string"
2187
2188 },
2189 "email": {
2190 "type": "string"
2191 },
2192 "firstName": {
2193 "type": "string"
2194 },
2195 "lastName": {
2196 "type": "string"
2197 },
2198 "role": {
2199 "type": "string",
2200 "description": "teacher, student, or admin"
2201 }
2202 }
2203 },
2204 "School": {
2205 "type": "object",
2206 "properties": {
2207 "id": {
2208 "type": "string"
2209 },
2210 "name": {
2211 "type": "string"
2212 },
2213 "master_district": {
2214 "type": "string",
2215 "description": "master-district school id to which the school is related to."
2216 },
2217 "timestamp": {
2218 "type": "string"
2219 },
2220 "active_color": {
2221 "type": "string",
2222 "description": "active_color(hex, rgb, rgba) of the embedded positPlayer for the school."
2223 },
2224 "inactive_color": {
2225 "type": "string",
2226 "description": "inactive_color(hex, rgb, rgba) of the embedded positPlayer for the school."
2227 },
2228 "base_color": {
2229 "type": "string",
2230 "description": "base_color(hex, rgb, rgba) of the embedded positPlayer for the school."
2231 },
2232 "logo": {
2233 "type": "string",
2234 "description": "url for the logo for the embedded positPlayer for the school."
2235 }
2236 }
2237 },
2238 "Section": {
2239 "type": "object",
2240 "properties": {
2241 "id": {
2242 "type": "string"
2243 },
2244 "teacher_id": {
2245 "type": "string"
2246 },
2247 "name": {
2248 "type": "string"
2249 },
2250 "description": {
2251 "type": "string"
2252 },
2253 "role": {
2254 "type": "string",
2255 "description": "root, or type"
2256 },
2257 "key": {
2258 "type": "string"
2259 }
2260 }
2261 },
2262 "Bulb": {
2263 "type": "object",
2264 "properties": {
2265 "id": {
2266 "type": "string"
2267 },
2268 "email": {
2269 "type": "string"
2270 },
2271 "firstName": {
2272 "type": "string"
2273 },
2274 "lastName": {
2275 "type": "string"
2276 },
2277 "role": {
2278 "type": "string",
2279 "description": "teacher, student, or admin"
2280 }
2281 }
2282 },
2283 "student_data": {
2284 "type": "object",
2285 "properties": {
2286 "max_time": {
2287 "type": "string",
2288 "description": "Current position in the bulb for the student."
2289 },
2290 "time_elapsed": {
2291 "type": "string",
2292 "description": "Time spent by the user on the bulb."
2293 },
2294 "start_time": {
2295 "type": "string",
2296 "description": "Timestamp of when the user started the bulb."
2297 },
2298 "points_available": {
2299 "type": "string",
2300 "description": "Total points available in the bulb."
2301 },
2302 "points_earned": {
2303 "type": "string",
2304 "description": "Total points score by the student in the bulb."
2305 },
2306 "active": {
2307 "type": "string",
2308 "description": "Current status of the student for the bulb. [Not Started, Inprogress, Complete]"
2309 },
2310 "feedback": {
2311 "type": "object",
2312 "description": "Feedback provided by the student at the end of lesson."
2313 }
2314 }
2315 }
2316 }
2317}