]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/api/openapi.yaml
Add auth documentation
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
1 swagger: '2.0'
2 info:
3 title: PeerTube
4 version: 1.0.0-beta
5 description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.
6 host: peertube.example.com
7 securityDefinitions:
8 OAuth2:
9 description: 'In the header: *Authorization: Bearer mytoken*'
10 type: oauth2
11 flow: password
12 # Not implemented yet
13 # authorizationUrl: https://example.com/oauth/authorize
14 tokenUrl: https://peertube.example.com/api/v1/users/token
15 basePath: '/api/v1'
16 schemes:
17 - https
18 paths:
19 '/accounts/{id}':
20 get:
21 tags:
22 - Accounts
23 consumes:
24 - application/json
25 produces:
26 - application/json
27 parameters:
28 - name: id
29 in: path
30 required: true
31 type: string
32 description: 'The id of the account'
33 - name: start
34 in: query
35 required: false
36 type: number
37 description: 'starting page'
38 - name: stop
39 in: query
40 required: false
41 type: number
42 description: 'stopping page'
43 - name: sort
44 in: query
45 required: false
46 type: number
47 description: 'sorting'
48 responses:
49 '200':
50 description: successful operation
51 schema:
52 $ref: '#/definitions/Account'
53 /accounts:
54 get:
55 tags:
56 - Accounts
57 consumes:
58 - application/json
59 produces:
60 - application/json
61 responses:
62 '200':
63 description: successful operation
64 schema:
65 type: array
66 items:
67 $ref: '#/definitions/Account'
68 /config:
69 get:
70 tags:
71 - Config
72 consumes:
73 - application/json
74 produces:
75 - application/json
76 responses:
77 '200':
78 description: successful operation
79 schema:
80 $ref: '#/definitions/ServerConfig'
81 /jobs:
82 get:
83 security:
84 - OAuth2: [ ]
85 tags:
86 - Job
87 consumes:
88 - application/json
89 produces:
90 - application/json
91 parameters:
92 - name: state
93 in: path
94 required: true
95 type: string
96 description: 'The id of the account'
97 - name: start
98 in: query
99 required: false
100 type: number
101 description: 'starting page'
102 - name: count
103 in: query
104 required: false
105 type: number
106 description: ''
107 - name: sort
108 in: query
109 required: false
110 type: number
111 description: 'sorting'
112 responses:
113 '200':
114 description: successful operation
115 schema:
116 type: array
117 items:
118 $ref: '#/definitions/Job'
119 '/server/following/{host}':
120 delete:
121 security:
122 - OAuth2: [ ]
123 tags:
124 - ServerFollowing
125 consumes:
126 - application/json
127 produces:
128 - application/json
129 parameters:
130 - name: host
131 in: path
132 required: true
133 type: string
134 description: 'The host to unfollow '
135 responses:
136 '201':
137 description: successful operation
138 /server/followers:
139 get:
140 tags:
141 - ServerFollowing
142 consumes:
143 - application/json
144 produces:
145 - application/json
146 parameters:
147 - name: start
148 in: query
149 required: false
150 type: number
151 description: 'starting page'
152 - name: stop
153 in: query
154 required: false
155 type: number
156 description: 'stopping page'
157 - name: sort
158 in: query
159 required: false
160 type: number
161 description: 'sorting'
162 responses:
163 '200':
164 description: successful operation
165 schema:
166 type: array
167 items:
168 $ref: '#/definitions/Follow'
169 /server/following:
170 get:
171 tags:
172 - ServerFollowing
173 consumes:
174 - application/json
175 produces:
176 - application/json
177 parameters:
178 - name: start
179 in: query
180 required: false
181 type: number
182 description: 'starting page'
183 - name: stop
184 in: query
185 required: false
186 type: number
187 description: 'stopping page'
188 - name: sort
189 in: query
190 required: false
191 type: number
192 description: 'sorting'
193 responses:
194 '200':
195 description: successful operation
196 schema:
197 type: array
198 items:
199 $ref: '#/definitions/Follow'
200 post:
201 security:
202 - OAuth2: [ ]
203 tags:
204 - ServerFollowing
205 consumes:
206 - application/json
207 produces:
208 - application/json
209 parameters:
210 - in: body
211 name: body
212 schema:
213 $ref: '#/definitions/Follow'
214 responses:
215 '204':
216 description: successful operation
217 /users:
218 post:
219 security:
220 - OAuth2: [ ]
221 tags:
222 - User
223 consumes:
224 - application/json
225 produces:
226 - application/json
227 parameters:
228 - in: body
229 name: body
230 required: true
231 description: 'User to create'
232 schema:
233 $ref: '#/definitions/AddUser'
234 responses:
235 '200':
236 description: successful operation
237 schema:
238 $ref: '#/definitions/AddUserResponse'
239 get:
240 security:
241 - OAuth2: [ ]
242 tags:
243 - User
244 consumes:
245 - application/json
246 produces:
247 - application/json
248 parameters:
249 - name: start
250 in: query
251 required: false
252 type: number
253 description: 'starting page'
254 - name: stop
255 in: query
256 required: false
257 type: number
258 description: 'stopping page'
259 - name: sort
260 in: query
261 required: false
262 type: number
263 description: 'sorting'
264 responses:
265 '200':
266 description: successful operation
267 schema:
268 type: array
269 items:
270 $ref: '#/definitions/User'
271 '/users/{id}':
272 delete:
273 security:
274 - OAuth2: [ ]
275 tags:
276 - User
277 consumes:
278 - application/json
279 produces:
280 - application/json
281 parameters:
282 - name: id
283 in: path
284 required: true
285 type: string
286 description: 'The user id '
287 responses:
288 '204':
289 description: successful operation
290 get:
291 security:
292 - OAuth2: [ ]
293 tags:
294 - User
295 consumes:
296 - application/json
297 produces:
298 - application/json
299 parameters:
300 - name: id
301 in: path
302 required: true
303 type: string
304 description: 'The user id '
305 responses:
306 '200':
307 description: successful operation
308 schema:
309 $ref: '#/definitions/User'
310 put:
311 security:
312 - OAuth2: [ ]
313 tags:
314 - User
315 consumes:
316 - application/json
317 produces:
318 - application/json
319 parameters:
320 - name: id
321 in: path
322 required: true
323 type: string
324 description: 'The user id '
325 - in: body
326 name: body
327 required: true
328 schema:
329 $ref: '#/definitions/UpdateUser'
330 responses:
331 '204':
332 description: successful operation
333 /users/me:
334 get:
335 security:
336 - OAuth2: [ ]
337 tags:
338 - User
339 consumes:
340 - application/json
341 produces:
342 - application/json
343 responses:
344 '200':
345 description: successful operation
346 schema:
347 type: array
348 items:
349 $ref: '#/definitions/User'
350 put:
351 security:
352 - OAuth2: [ ]
353 tags:
354 - User
355 consumes:
356 - application/json
357 produces:
358 - application/json
359 parameters:
360 - in: body
361 name: body
362 required: true
363 schema:
364 $ref: '#/definitions/UpdateMe'
365 responses:
366 '204':
367 description: successful operation
368 /users/me/video-quota-used:
369 get:
370 security:
371 - OAuth2: [ ]
372 tags:
373 - User
374 consumes:
375 - application/json
376 produces:
377 - application/json
378 parameters: []
379 responses:
380 '200':
381 description: successful operation
382 schema:
383 type: number
384 '/users/me/videos/{videoId}/rating':
385 get:
386 security:
387 - OAuth2: [ ]
388 tags:
389 - User
390 consumes:
391 - application/json
392 produces:
393 - application/json
394 parameters:
395 - name: videoId
396 in: path
397 required: true
398 type: string
399 description: 'The video id '
400 responses:
401 '200':
402 description: successful operation
403 schema:
404 $ref: '#/definitions/GetMeVideoRating'
405 /users/me/videos:
406 get:
407 security:
408 - OAuth2: [ ]
409 tags:
410 - User
411 consumes:
412 - application/json
413 produces:
414 - application/json
415 parameters:
416 - name: start
417 in: query
418 required: false
419 type: number
420 description: 'starting page'
421 - name: stop
422 in: query
423 required: false
424 type: number
425 description: 'stopping page'
426 - name: sort
427 in: query
428 required: false
429 type: number
430 description: 'sorting'
431 responses:
432 '200':
433 description: successful operation
434 schema:
435 type: array
436 items:
437 $ref: '#/definitions/Video'
438 /users/register:
439 post:
440 tags:
441 - User
442 consumes:
443 - application/json
444 produces:
445 - application/json
446 parameters:
447 - in: body
448 name: body
449 required: true
450 schema:
451 $ref: '#/definitions/RegisterUser'
452 responses:
453 '204':
454 description: successful operation
455 /users/me/avatar/pick:
456 post:
457 security:
458 - OAuth2: [ ]
459 tags:
460 - User
461 consumes:
462 - multipart/form-data
463 produces:
464 - application/json
465 parameters:
466 - in: formData
467 name: avatarfile
468 type: file
469 description: The file to upload.
470 responses:
471 '200':
472 description: successful operation
473 schema:
474 $ref: '#/definitions/Avatar'
475 /videos:
476 get:
477 tags:
478 - Video
479 consumes:
480 - application/json
481 produces:
482 - application/json
483 parameters:
484 - name: start
485 in: query
486 required: false
487 type: number
488 description: 'starting page'
489 - name: stop
490 in: query
491 required: false
492 type: number
493 description: 'stopping page'
494 - name: sort
495 in: query
496 required: false
497 type: number
498 description: 'sorting'
499 responses:
500 '200':
501 description: successful operation
502 schema:
503 type: array
504 items:
505 $ref: '#/definitions/Video'
506 /videos/categories:
507 get:
508 tags:
509 - Video
510 consumes:
511 - application/json
512 produces:
513 - application/json
514 responses:
515 '200':
516 description: successful operation
517 schema:
518 type: array
519 items:
520 type: string
521 /videos/licences:
522 get:
523 tags:
524 - Video
525 consumes:
526 - application/json
527 produces:
528 - application/json
529 responses:
530 '200':
531 description: successful operation
532 schema:
533 type: array
534 items:
535 type: string
536 /videos/languages:
537 get:
538 tags:
539 - Video
540 consumes:
541 - application/json
542 produces:
543 - application/json
544 responses:
545 '200':
546 description: successful operation
547 schema:
548 type: array
549 items:
550 type: string
551 /videos/privacies:
552 get:
553 tags:
554 - Video
555 consumes:
556 - application/json
557 produces:
558 - application/json
559 responses:
560 '200':
561 description: successful operation
562 schema:
563 type: array
564 items:
565 type: string
566 /videos/search:
567 get:
568 tags:
569 - Video
570 consumes:
571 - application/json
572 produces:
573 - application/json
574 parameters:
575 - name: start
576 in: query
577 required: false
578 type: number
579 description: 'starting page'
580 - name: stop
581 in: query
582 required: false
583 type: number
584 description: 'stopping page'
585 - name: sort
586 in: query
587 required: false
588 type: number
589 description: 'sorting'
590 responses:
591 '200':
592 description: successful operation
593 schema:
594 type: array
595 items:
596 $ref: '#/definitions/Video'
597 "/videos/{id}":
598 put:
599 security:
600 - OAuth2: [ ]
601 tags:
602 - Video
603 consumes:
604 - multipart/form-data
605 produces:
606 - application/json
607 parameters:
608 - name: id
609 in: path
610 required: true
611 type: string
612 description: 'The video id'
613 - name: thumbnailfile
614 in: formData
615 type: file
616 description: 'Video thumbnail file'
617 - name: previewfile
618 in: formData
619 type: file
620 description: 'Video preview file'
621 - name: category
622 in: formData
623 type: number
624 description: 'Video category'
625 - name: licence
626 in: formData
627 type: number
628 description: 'Video licence'
629 - name: language
630 in: formData
631 type: number
632 description: 'Video language'
633 - name: description
634 in: formData
635 type: string
636 description: 'Video description'
637 - name: support
638 in: formData
639 type: string
640 description: 'Text describing how to support the video uploader'
641 - name: nsfw
642 in: formData
643 type: boolean
644 description: 'Whether or not this video contains sensitive content'
645 - name: name
646 in: formData
647 type: string
648 description: 'Video name'
649 - name: tags
650 in: formData
651 type: string[]
652 description: 'Video tags'
653 - name: commentsEnabled
654 in: formData
655 type: boolean
656 description: 'Enable or disable comments for this video'
657 - name: privacy
658 in: formData
659 type: string
660 enum: [Public, Unlisted]
661 description: 'Video privacy'
662 responses:
663 '200':
664 description: successful operation
665 schema:
666 $ref: '#/definitions/Video'
667 get:
668 tags:
669 - Video
670 consumes:
671 - application/json
672 produces:
673 - application/json
674 parameters:
675 - name: id
676 in: path
677 required: true
678 type: string
679 description: 'The video id '
680 responses:
681 '200':
682 description: successful operation
683 schema:
684 $ref: '#/definitions/Video'
685 delete:
686 security:
687 - OAuth2: [ ]
688 tags:
689 - Video
690 consumes:
691 - application/json
692 produces:
693 - application/json
694 parameters:
695 - name: id
696 in: path
697 required: true
698 type: string
699 description: 'The video id '
700 responses:
701 '204':
702 description: successful operation
703 "/videos/{id}/description":
704 get:
705 tags:
706 - Video
707 consumes:
708 - application/json
709 produces:
710 - application/json
711 parameters:
712 - name: id
713 in: path
714 required: true
715 type: string
716 description: 'The video id '
717 responses:
718 '200':
719 description: successful operation
720 schema:
721 type: string
722 "/videos/{id}/views":
723 post:
724 tags:
725 - Video
726 consumes:
727 - application/json
728 produces:
729 - application/json
730 parameters:
731 - name: id
732 in: path
733 required: true
734 type: string
735 description: 'The video id '
736 responses:
737 '204':
738 description: successful operation
739 /videos/upload:
740 post:
741 security:
742 - OAuth2: [ ]
743 tags:
744 - Video
745 consumes:
746 - multipart/form-data
747 produces:
748 - application/json
749 parameters:
750 - name: videofile
751 in: formData
752 type: file
753 required: true
754 description: 'Video file'
755 - name: thumbnailfile
756 in: formData
757 type: file
758 required: true
759 description: 'Video thumbnail file'
760 - name: previewfile
761 in: formData
762 type: file
763 required: true
764 description: 'Video preview file'
765 - name: category
766 in: formData
767 type: number
768 description: 'Video category'
769 - name: licence
770 in: formData
771 type: number
772 description: 'Video licence'
773 - name: language
774 in: formData
775 type: number
776 description: 'Video language'
777 - name: description
778 in: formData
779 type: string
780 description: 'Video description'
781 - name: support
782 in: formData
783 type: string
784 description: 'Text describing how to support the video uploader'
785 - name: channelId
786 in: formData
787 required: true
788 type: number
789 description: 'Channel id that will contain this video'
790 - name: nsfw
791 in: formData
792 required: true
793 type: boolean
794 description: 'Whether or not this video contains sensitive content'
795 - name: name
796 in: formData
797 required: true
798 type: string
799 description: 'Video name'
800 - name: tags
801 in: formData
802 type: string[]
803 description: 'Video tags'
804 - name: commentsEnabled
805 in: formData
806 type: boolean
807 description: 'Enable or disable comments for this video'
808 - name: privacy
809 in: formData
810 required: true
811 type: string
812 enum: [Public, Unlisted, Private]
813 description: 'Video privacy'
814 responses:
815 '200':
816 description: successful operation
817 schema:
818 $ref: '#/definitions/VideoUploadResponse'
819 /videos/abuse:
820 get:
821 security:
822 - OAuth2: [ ]
823 tags:
824 - VideoAbuse
825 consumes:
826 - application/json
827 produces:
828 - application/json
829 parameters:
830 - name: start
831 in: query
832 required: false
833 type: number
834 description: 'starting page'
835 - name: stop
836 in: query
837 required: false
838 type: number
839 description: 'stopping page'
840 - name: sort
841 in: query
842 required: false
843 type: number
844 description: 'sorting'
845 responses:
846 '200':
847 description: successful operation
848 schema:
849 type: array
850 items:
851 $ref: '#/definitions/VideoAbuse'
852 "/videos/{id}/abuse":
853 post:
854 security:
855 - OAuth2: [ ]
856 tags:
857 - VideoAbuse
858 consumes:
859 - application/json
860 produces:
861 - application/json
862 parameters:
863 - name: id
864 in: path
865 required: true
866 type: string
867 description: 'The video id '
868 responses:
869 '204':
870 description: successful operation
871 "/videos/{videoId}/blacklist":
872 post:
873 security:
874 - OAuth2: [ ]
875 tags:
876 - VideoBlacklist
877 consumes:
878 - application/json
879 produces:
880 - application/json
881 parameters:
882 - name: videoId
883 in: path
884 required: true
885 type: string
886 description: 'The video id '
887 responses:
888 '204':
889 description: successful operation
890 delete:
891 security:
892 - OAuth2: [ ]
893 tags:
894 - VideoBlacklist
895 consumes:
896 - application/json
897 produces:
898 - application/json
899 parameters:
900 - name: videoId
901 in: path
902 required: true
903 type: string
904 description: 'The video id '
905 responses:
906 '204':
907 description: successful operation
908 /videos/blacklist:
909 get:
910 security:
911 - OAuth2: [ ]
912 tags:
913 - VideoBlacklist
914 consumes:
915 - application/json
916 produces:
917 - application/json
918 parameters:
919 - name: start
920 in: query
921 required: false
922 type: number
923 description: 'starting page'
924 - name: stop
925 in: query
926 required: false
927 type: number
928 description: 'stopping page'
929 - name: sort
930 in: query
931 required: false
932 type: number
933 description: 'sorting'
934 responses:
935 '200':
936 description: successful operation
937 schema:
938 type: array
939 items:
940 $ref: '#/definitions/VideoBlacklist'
941 /videos/channels:
942 get:
943 tags:
944 - VideoChannel
945 consumes:
946 - application/json
947 produces:
948 - application/json
949 parameters:
950 - name: start
951 in: query
952 required: false
953 type: number
954 description: 'starting page'
955 - name: stop
956 in: query
957 required: false
958 type: number
959 description: 'stopping page'
960 - name: sort
961 in: query
962 required: false
963 type: number
964 description: 'sorting'
965 responses:
966 '200':
967 description: successful operation
968 schema:
969 type: array
970 items:
971 $ref: '#/definitions/VideoChannel'
972 post:
973 security:
974 - OAuth2: [ ]
975 tags:
976 - VideoChannel
977 consumes:
978 - application/json
979 produces:
980 - application/json
981 parameters:
982 - in: body
983 name: body
984 schema:
985 $ref: '#/definitions/VideoChannelInput'
986 responses:
987 '204':
988 description: successful operation
989 "/videos/channels/{id}":
990 get:
991 tags:
992 - VideoChannel
993 consumes:
994 - application/json
995 produces:
996 - application/json
997 parameters:
998 - name: id
999 in: path
1000 required: true
1001 type: string
1002 description: 'The video id '
1003 responses:
1004 '200':
1005 description: successful operation
1006 schema:
1007 $ref: '#/definitions/VideoChannel'
1008 put:
1009 security:
1010 - OAuth2: [ ]
1011 tags:
1012 - VideoChannel
1013 consumes:
1014 - application/json
1015 produces:
1016 - application/json
1017 parameters:
1018 - name: id
1019 in: path
1020 required: true
1021 type: string
1022 description: 'The video id '
1023 - in: body
1024 name: body
1025 schema:
1026 $ref: '#/definitions/VideoChannelInput'
1027 responses:
1028 '204':
1029 description: successful operation
1030 delete:
1031 security:
1032 - OAuth2: [ ]
1033 tags:
1034 - VideoChannel
1035 consumes:
1036 - application/json
1037 produces:
1038 - application/json
1039 parameters:
1040 - name: id
1041 in: path
1042 required: true
1043 type: string
1044 description: 'The video id '
1045 responses:
1046 '204':
1047 description: successful operation
1048 /videos/accounts/{accountId}/channels:
1049 get:
1050 tags:
1051 - VideoChannel
1052 consumes:
1053 - application/json
1054 produces:
1055 - application/json
1056 parameters:
1057 - name: accountId
1058 in: path
1059 required: true
1060 type: string
1061 description: 'The account id '
1062 responses:
1063 '200':
1064 description: successful operation
1065 schema:
1066 type: array
1067 items:
1068 $ref: '#/definitions/VideoChannel'
1069 "/videos/{videoId}/comment-threads":
1070 get:
1071 tags:
1072 - VideoComment
1073 consumes:
1074 - application/json
1075 produces:
1076 - application/json
1077 parameters:
1078 - name: videoId
1079 in: path
1080 required: true
1081 type: string
1082 description: 'The video id '
1083 - name: start
1084 in: query
1085 required: false
1086 type: number
1087 description: 'starting page'
1088 - name: stop
1089 in: query
1090 required: false
1091 type: number
1092 description: 'stopping page'
1093 - name: sort
1094 in: query
1095 required: false
1096 type: number
1097 description: 'sorting'
1098 responses:
1099 '200':
1100 description: successful operation
1101 schema:
1102 $ref: '#/definitions/CommentThreadResponse'
1103 post:
1104 security:
1105 - OAuth2: [ ]
1106 tags:
1107 - VideoComment
1108 consumes:
1109 - application/json
1110 produces:
1111 - application/json
1112 parameters:
1113 - name: videoId
1114 in: path
1115 required: true
1116 type: string
1117 description: 'The video id '
1118 responses:
1119 '200':
1120 description: successful operation
1121 schema:
1122 $ref: '#/definitions/CommentThreadPostResponse'
1123 "/videos/{videoId}/comment-threads/{threadId}":
1124 get:
1125 tags:
1126 - VideoComment
1127 consumes:
1128 - application/json
1129 produces:
1130 - application/json
1131 parameters:
1132 - name: videoId
1133 in: path
1134 required: true
1135 type: string
1136 description: 'The video id '
1137 - name: threadId
1138 in: path
1139 required: true
1140 type: string
1141 description: 'The thread id '
1142 responses:
1143 '200':
1144 description: successful operation
1145 schema:
1146 $ref: '#/definitions/VideoCommentThreadTree'
1147 "/videos/{videoId}/comments/{commentId}":
1148 post:
1149 security:
1150 - OAuth2: [ ]
1151 tags:
1152 - VideoComment
1153 consumes:
1154 - application/json
1155 produces:
1156 - application/json
1157 parameters:
1158 - name: videoId
1159 in: path
1160 required: true
1161 type: string
1162 description: 'The video id '
1163 - name: commentId
1164 in: path
1165 required: true
1166 type: string
1167 description: 'The comment id '
1168 responses:
1169 '200':
1170 description: successful operation
1171 schema:
1172 $ref: '#/definitions/CommentThreadPostResponse'
1173 delete:
1174 security:
1175 - OAuth2: [ ]
1176 tags:
1177 - VideoComment
1178 consumes:
1179 - application/json
1180 produces:
1181 - application/json
1182 parameters:
1183 - name: videoId
1184 in: path
1185 required: true
1186 type: string
1187 description: 'The video id '
1188 - name: commentId
1189 in: path
1190 required: true
1191 type: string
1192 description: 'The comment id '
1193 responses:
1194 '204':
1195 description: successful operation
1196 "/videos/{id}/rate":
1197 put:
1198 security:
1199 - OAuth2: [ ]
1200 tags:
1201 - VideoRate
1202 consumes:
1203 - application/json
1204 produces:
1205 - application/json
1206 parameters:
1207 - name: id
1208 in: path
1209 required: true
1210 type: string
1211 description: 'The video id '
1212 responses:
1213 '204':
1214 description: successful operation
1215 definitions:
1216 VideoConstant:
1217 properties:
1218 id:
1219 type: number
1220 label:
1221 type: string
1222 VideoPrivacy:
1223 type: string
1224 enum: [Public, Unlisted, Private]
1225 Video:
1226 properties:
1227 id:
1228 type: number
1229 uuid:
1230 type: string
1231 createdAt:
1232 type: string
1233 publishedAt:
1234 type: string
1235 updatedAt:
1236 type: string
1237 category:
1238 $ref: "#/definitions/VideoConstant"
1239 licence:
1240 $ref: "#/definitions/VideoConstant"
1241 language:
1242 $ref: "#/definitions/VideoConstant"
1243 privacy:
1244 $ref: "#/definitions/VideoPrivacy"
1245 description:
1246 type: string
1247 duration:
1248 type: number
1249 isLocal:
1250 type: boolean
1251 name:
1252 type: string
1253 thumbnailPath:
1254 type: string
1255 previewPath:
1256 type: string
1257 embedPath:
1258 type: string
1259 views:
1260 type: number
1261 likes:
1262 type: number
1263 dislikes:
1264 type: number
1265 nsfw:
1266 type: boolean
1267 account:
1268 type: object
1269 properties:
1270 name:
1271 type: string
1272 displayName:
1273 type: string
1274 url:
1275 type: string
1276 host:
1277 type: string
1278 avatar:
1279 $ref: "#/definitions/Avatar"
1280 VideoAbuse:
1281 properties:
1282 id:
1283 type: number
1284 reason:
1285 type: string
1286 reporterAccount:
1287 $ref: "#/definitions/Account"
1288 video:
1289 type: object
1290 properties:
1291 id:
1292 type: number
1293 name:
1294 type: string
1295 uuid:
1296 type: string
1297 url:
1298 type: string
1299 createdAt:
1300 type: string
1301 VideoBlacklist:
1302 properties:
1303 id:
1304 type: number
1305 videoId:
1306 type: number
1307 createdAt:
1308 type: string
1309 updatedAt:
1310 type: string
1311 name:
1312 type: string
1313 uuid:
1314 type: string
1315 description:
1316 type: string
1317 duration:
1318 type: number
1319 views:
1320 type: number
1321 likes:
1322 type: number
1323 dislikes:
1324 type: number
1325 nsfw:
1326 type: boolean
1327 VideoChannel:
1328 properties:
1329 displayName:
1330 type: string
1331 description:
1332 type: string
1333 isLocal:
1334 type: boolean
1335 owner:
1336 type: object
1337 properties:
1338 name:
1339 type: string
1340 uuid:
1341 type: string
1342 videos:
1343 type: array
1344 items:
1345 $ref: "#/definitions/Video"
1346 VideoComment:
1347 properties:
1348 id:
1349 type: number
1350 url:
1351 type: string
1352 text:
1353 type: string
1354 threadId:
1355 type: number
1356 inReplyToCommentId:
1357 type: number
1358 videoId:
1359 type: number
1360 createdAt:
1361 type: string
1362 updatedAt:
1363 type: string
1364 totalReplies:
1365 type: number
1366 account:
1367 $ref: "#/definitions/Account"
1368 VideoCommentThreadTree:
1369 properties:
1370 comment:
1371 $ref: "#/definitions/VideoComment"
1372 children:
1373 type: array
1374 items:
1375 $ref: "#/definitions/VideoCommentThreadTree"
1376 Avatar:
1377 properties:
1378 path:
1379 type: string
1380 createdAt:
1381 type: string
1382 updatedAt:
1383 type: string
1384 Actor:
1385 properties:
1386 id:
1387 type: number
1388 uuid:
1389 type: string
1390 url:
1391 type: string
1392 name:
1393 type: string
1394 host:
1395 type: string
1396 followingCount:
1397 type: number
1398 followersCount:
1399 type: number
1400 createdAt:
1401 type: string
1402 updatedAt:
1403 type: string
1404 avatar:
1405 $ref: "#/definitions/Avatar"
1406 Account:
1407 allOf:
1408 - $ref: "#/definitions/Actor"
1409 - properties:
1410 displayName:
1411 type: string
1412 User:
1413 properties:
1414 id:
1415 type: number
1416 username:
1417 type: string
1418 email:
1419 type: string
1420 displayNSFW:
1421 type: boolean
1422 autoPlayVideo:
1423 type: boolean
1424 role:
1425 type: string
1426 enum: [User, Moderator, Administrator]
1427 videoQuota:
1428 type: number
1429 createdAt:
1430 type: string
1431 account:
1432 $ref: "#/definitions/Account"
1433 videoChannels:
1434 type: array
1435 items:
1436 $ref: "#/definitions/VideoChannel"
1437 ServerConfig:
1438 properties:
1439 signup:
1440 type: object
1441 properties:
1442 allowed:
1443 type: boolean
1444 transcoding:
1445 type: object
1446 properties:
1447 enabledResolutions:
1448 type: array
1449 items:
1450 type: number
1451 avatar:
1452 type: object
1453 properties:
1454 file:
1455 type: object
1456 properties:
1457 size:
1458 type: object
1459 properties:
1460 max:
1461 type: number
1462 extensions:
1463 type: array
1464 items:
1465 type: string
1466 video:
1467 type: object
1468 properties:
1469 file:
1470 type: object
1471 properties:
1472 extensions:
1473 type: array
1474 items:
1475 type: string
1476 Follow:
1477 properties:
1478 id:
1479 type: number
1480 follower:
1481 $ref: "#/definitions/Actor"
1482 following:
1483 $ref: "#/definitions/Actor"
1484 score:
1485 type: number
1486 state:
1487 type: string
1488 enum: [pending, accepted]
1489 createdAt:
1490 type: string
1491 updatedAt:
1492 type: string
1493 Job:
1494 properties:
1495 id:
1496 type: number
1497 state:
1498 type: string
1499 enum: [pending, processing, error, success]
1500 category:
1501 type: string
1502 enum: [transcoding, activitypub-http]
1503 handlerName:
1504 type: string
1505 handlerInputData:
1506 type: string
1507 createdAt:
1508 type: string
1509 updatedAt:
1510 type: string
1511
1512 # Api responses
1513 AddUserResponse:
1514 properties:
1515 id:
1516 type: number
1517 uuid:
1518 type: string
1519 VideoUploadResponse:
1520 properties:
1521 video:
1522 type: object
1523 properties:
1524 id:
1525 type: number
1526 uuid:
1527 type: string
1528 CommentThreadResponse:
1529 properties:
1530 total:
1531 type: number
1532 data:
1533 type: array
1534 items:
1535 $ref: "#/definitions/VideoComment"
1536 CommentThreadPostResponse:
1537 properties:
1538 comment:
1539 $ref: "#/definitions/VideoComment"
1540
1541 # Request bodies
1542 AddUser:
1543 properties:
1544 username:
1545 type: string
1546 description: 'The user username '
1547 password:
1548 type: string
1549 description: 'The user password '
1550 email:
1551 type: string
1552 description: 'The user email '
1553 videoQuota:
1554 type: string
1555 description: 'The user videoQuota '
1556 role:
1557 type: string
1558 description: 'The user role '
1559 required:
1560 - username
1561 - password
1562 - email
1563 - videoQuota
1564 - role
1565 UpdateUser:
1566 properties:
1567 id:
1568 type: string
1569 description: 'The user id '
1570 email:
1571 type: string
1572 description: 'The updated email of the user '
1573 videoQuota:
1574 type: string
1575 description: 'The updated videoQuota of the user '
1576 role:
1577 type: string
1578 description: 'The updated role of the user '
1579 required:
1580 - id
1581 - email
1582 - videoQuota
1583 - role
1584 UpdateMe:
1585 properties:
1586 password:
1587 type: string
1588 description: 'Your new password '
1589 email:
1590 type: string
1591 description: 'Your new email '
1592 displayNSFW:
1593 type: string
1594 description: 'Your new displayNSFW '
1595 autoPlayVideo:
1596 type: string
1597 description: 'Your new autoPlayVideo '
1598 required:
1599 - password
1600 - email
1601 - displayNSFW
1602 - autoPlayVideo
1603 GetMeVideoRating:
1604 properties:
1605 id:
1606 type: string
1607 description: 'Id of the video '
1608 rating:
1609 type: number
1610 description: 'Rating of the video '
1611 required:
1612 - id
1613 - rating
1614 RegisterUser:
1615 properties:
1616 username:
1617 type: string
1618 description: 'The username of the user '
1619 password:
1620 type: string
1621 description: 'The password of the user '
1622 email:
1623 type: string
1624 description: 'The email of the user '
1625 required:
1626 - username
1627 - password
1628 - email
1629 VideoChannelInput:
1630 properties:
1631 name:
1632 type: string
1633 description:
1634 type: string