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